Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read strings fav _ drink and least _ fav _ drink from input. Output the following: ' My favorite drink' followed by fav _ drink,
Read strings favdrink and leastfavdrink from input. Output the following:
My favorite drink' followed by favdrink, then 'has' followed by the length of favdrink, then 'characters', all separated by spaces.
My least favorite drink' followed by leastfavdrink, then 'has' followed by the length of leastfavdrink, then 'characters', all separated by spaces.
Click here for example
Ex: If the input is:
smoothie
espresso
then the output is:
My favorite drink smoothie has characters
My least favorite drink espresso has characters
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started