COS1511 - Assignment 01 – 2022
Due date
Wednesday, 20 April 2022, 3:00 PM
QUESTION 1
#include <iostream>
using namespace std;
int main()
{
int mFactor;//variable to store the value to be multiplied with.
cout << "Please enter the factor to multiply the ingredients with : ";
cin >> mFactor;
cout << "Recipe: Easy pancakes" << endl;
cout << " Ingredients " << endl;
cout << "\t" << mFactor * 3 << "cups all-purpose flour" << endl;
cout << "\t" << mFactor * 1 << " cup white sugar" << endl;
cout << "\t" << mFactor * 5 << " teaspoons baking powder" << endl;
cout << "\t" << mFactor * 1 << " egg, beaten" << endl;
cout << "\t" << mFactor * 1 << " cup milk" << endl;
cout << " Method" << endl;
cout << "\tSTEP 1: Preheat oven to 400 degrees F (200 degrees C). Lightly
grease a baking sheet.";
cout << endl;
cout << "\tSTEP 2: In a large bowl, combine flour, sugar, baking powder,
and salt."<< endl;
cout << "\tSTEP 3: Cut in butter. Mix the egg and milk in a small bowl,
and stir into flour mixture until moistened." <<endl;
cout << "\tSTEP 4: Turn dough out onto a lightly floured surface, and
knead briefly. Roll dough out into a"<< endl;
cout << "\t\t1/2 inch thick round. Cut into 8 wedges, and place on the
prepared baking sheet." <<endl;
cout << "\tSTEP 5: Bake 15 minutes in the preheated oven, or until golden
brown."<<endl;
return 0;
}
My Assignments 27682021794 www.myassignments.co.za
Due date
Wednesday, 20 April 2022, 3:00 PM
QUESTION 1
#include <iostream>
using namespace std;
int main()
{
int mFactor;//variable to store the value to be multiplied with.
cout << "Please enter the factor to multiply the ingredients with : ";
cin >> mFactor;
cout << "Recipe: Easy pancakes" << endl;
cout << " Ingredients " << endl;
cout << "\t" << mFactor * 3 << "cups all-purpose flour" << endl;
cout << "\t" << mFactor * 1 << " cup white sugar" << endl;
cout << "\t" << mFactor * 5 << " teaspoons baking powder" << endl;
cout << "\t" << mFactor * 1 << " egg, beaten" << endl;
cout << "\t" << mFactor * 1 << " cup milk" << endl;
cout << " Method" << endl;
cout << "\tSTEP 1: Preheat oven to 400 degrees F (200 degrees C). Lightly
grease a baking sheet.";
cout << endl;
cout << "\tSTEP 2: In a large bowl, combine flour, sugar, baking powder,
and salt."<< endl;
cout << "\tSTEP 3: Cut in butter. Mix the egg and milk in a small bowl,
and stir into flour mixture until moistened." <<endl;
cout << "\tSTEP 4: Turn dough out onto a lightly floured surface, and
knead briefly. Roll dough out into a"<< endl;
cout << "\t\t1/2 inch thick round. Cut into 8 wedges, and place on the
prepared baking sheet." <<endl;
cout << "\tSTEP 5: Bake 15 minutes in the preheated oven, or until golden
brown."<<endl;
return 0;
}
My Assignments 27682021794 www.myassignments.co.za