Question
Whenever you cook eggs for breakfast, you must decide how many eggs to use. You like to use this rule of thumbuse approximately one and
Whenever you cook eggs for breakfast, you must decide how many eggs to use. You like to use this rule of thumbuse approximately one and one-half eggs per person. Of course, you cant use half an egg, so you round up. For example, if you have three people who want to eat, you use five eggs.
Write a code fragment that prompts the user to enter the number of eaters, calculates the number of eggs required, and prints either No one wants to eat. (if the user enters a non-positive value) or Go to the Waffle House! (if the user enters a value greater than 3) or Use number-of-eggs eggs., where number-of-eggs is the number of eggs needed to feed the specified number of eaters.
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