Hello everyone,
I'm new to C++ and I have two assignments that I to work on. The first how do I write an algorithm that will search for the smallest, largest, and average out five random numbers.
This is what I have so far for my algorithm:
1. Get value of n1, n2, n3, n4, n5
2. Set value for smallest n
3. Set value for largest n
4. Set value for average (n1+n2+n3+n4+n5)/5
5. Repeat step 1
The second is how can I determine how many coins are in 0 to 99. I have something like this for my second assignment:
1. Get value of total coins
2. Set value of quarters to q=.25
3. Set value of dimes to d=.10
4. Set value of nickels to n=.05
5. Set value of pennies to p=.01
6. Repeat step 1