100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Overig

COS1511 ASSIGNMENT 1 SOLUTIONS 2021

Beoordeling
-
Verkocht
1
Pagina's
15
Geüpload op
22-05-2021
Geschreven in
2021/2022

COS1511 ASSIGNMENT 1 SOLUTIONS 2021. Fully detailed code included and was done in word. Really good marks guaranteed.

Instelling
Vak









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
22 mei 2021
Aantal pagina's
15
Geschreven in
2021/2022
Type
Overig
Persoon
Onbekend

Onderwerpen

Voorbeeld van de inhoud

COS1511

ASSSIGNMENT 1 SOLUTIONS



QUESTION 1
#include<iostream>

using namespace std;

int main()
{
int mFactor;

//takes input from the user for the value of mFactor
cout<<"Please enter the factor to multiply the ingredients with: ";
cin>>mFactor;


cout<<"\nItalian Noodles Recipe"<<endl;
cout<<"\tIngredients"<<endl;


//Ingredients quantity is multiplied with mFactor wherever a number
appears.
cout<<"\t\t"<<1*mFactor<<" packet of Instant
noodles"<<endl<<"\t\t"<<1*mFactor<<" teaspoon
Oil"<<endl<<"\t\t"<<2*mFactor<<" Garlic Cloves finely
chopped"<<endl<<"\t\t"<<1*mFactor<<" cup Mushrooms
diced"<<endl<<"\t\t"<<1*mFactor/2<<" cup Red Pasta
Sauce"<<endl<<"\t\t"<<1*mFactor/4<<" teaspoon Oregano
dried"<<endl<<"\t\t"<<2*mFactor<<" tablespoons Olives
sliced"<<endl<<"\t\t"<<"A few Basil leaves"<<endl<<"\t\t"<<2*mFactor<<"
tablespoon Cheese grated"<<endl<<"\t\t"<<"Salt to taste"<<endl;


cout<<"\n\tMethod"<<endl;
cout<<"\t\t1. Cook the noodles according to package directions without
the tastemaker/masala."<<endl<<"\t\t2. Drain and set aside."<<endl<<"\t\t3.
Heat oil in a pan and add garlic. Saute for a minute."<<endl<<"\t\t4. Now
add mushrooms and cook the mushrooms for two minutes."<<endl<<"\t\t5. Now,
add pasta sauce, oregano and the noodles."<<endl<<"\t\t6. Bring this to a
quick simmer and switch off the flame."<<endl<<"\t\t7. Top with olives,
basil and cheese. Serve immediately.";


return 0;
}
Output:

, QUESTION2
using namespace std;

int main()
{
//Variables declared
int nrPupils,nrGroups,nrLeft,groupSize;
nrPupils=56;

//Input statement
cout<<"Please enter the size of each group? ";
cin>>groupSize;

//Calculate nrGroups and nrLeft
nrGroups=nrPupils/groupSize;
nrLeft=ceil((nrPupils-(nrGroups*groupSize))+((nrPupils/(float)groupSize)-nrGroups));

//Display Result
cout<<"\nThere are "<<nrGroups<<" groups consisting of "<<groupSize<<" pupils"<<endl;
cout<<"There are "<<nrLeft<<" remaining pupils"<<endl;

return 0;
}

**Code ended**

Output:

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
cilliersfrederick University of Johannesburg
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
626
Lid sinds
7 jaar
Aantal volgers
384
Documenten
353
Laatst verkocht
2 maanden geleden
Mathsmadeeasy

We supply detail solutions to assignments so that you can understand the theory and the Method about it. So that you can ace the exam. All Unisa students will benefit from our solutions and become masters in the module in no time.

3,3

94 beoordelingen

5
28
4
20
3
16
2
14
1
16

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen