Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A cookie recipe calls for the following ingredients: - 1.5 cups of sugar - 1 cup of butter - 2.75 cups of flour The recipe

image text in transcribed
A cookie recipe calls for the following ingredients: - 1.5 cups of sugar - 1 cup of butter - 2.75 cups of flour The recipe produces 48 cookies with this amount of ingredients. Write a program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient needed for the specified number of cookies. When the program asks the user for the number of cookies, it should display the following string as a prompt: 'Enter number of cookies:' When the program displays the number of cups of ingredients, it should display a message in the following format: You need x cups of sugar, y cups of butter, and z cups of flour. Where x is the number of cups of sugar, y is the number of cups of butter, and z is the number of cups of flour. Don't worry about rounding the numbers in the output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago