COS1511 Introduction To Programming 1Assignment 1 2022 (Questions). Question 1
Find a good cookbook. Read the instructions for your favourite dish. Write a program to display the recipe on the
screen but with a difference. The quantity of each ingredient must be multiplied by a value entered from...
1 Assignment 1: 2022 SUBMISSION:
Electronically via myUnisa
Please note that we automatically give five days extension for this assignment. It will be to
your own advantage to check after a few days whether the assignment has been registered on
the system. If you have not completed the assignment by the extension date, submit whatever
you have completed – you will get marks for everything that you have done.
If myUnisa is off-line when you want to submit the assignment, you need not contact us,
because we will be aware of it. Simply submit it as soon as myUnisa is available again.
DUE DATE 20 April 2022
UNIQUE NUMBER 830138
EXTENSION There is an automatic extension until 25 April. You do
not need to phone or send an e-mail to request
automatic extension
TUTORIAL MATTER Study Guide, Lessons 1 – 16
CONTRIBUTION WEIGHT TO 20%
SEMESTER MARK
QUESTIONS Practical exercises
IS YOUR SOFTWARE INSTALLED?
Look at ‘Troubleshooting’ under ‘Using the software’ in file index.html on Disk2016.
If you struggle to install the software, please contact your e-tutor.
Question 1
Find a good cookbook. Read the instructions for your favourite dish. Write a program to display the recipe on the
screen but with a difference. The quantity of each ingredient must be multiplied by a value entered from the
keyboard.
For example, if the recipe needs 2 cups of flour the output displayed will be something like this
Please enter the factor to multiply the ingredients with : 4
Recipe name
Ingredients
// other ingredients
8 cups flour
Method
The program has the following structure:
• Declare an int variable named mFactor to store the value with which the quantity of each ingredient
must be multiplied.
• The program must make use of a cin statement to input a value from the keyboard and store it in
mFactor.
Submit both your program and output.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller DoctorReinhad. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R57,70. You're not tied to anything after your purchase.