28, 32,37,24,33 im not sure how to make the program calculate it
An example of a program to average these values
Collapse
X
-
-
we can't actually put the code out there for you...(in case it is school related)
but here would be your algorithm
1.)Ask user to input the variables(optio nal)
2.)calculate the sum of the variables: sum = var1+var2+var3+ var4+var5
3.)divide them by the number of variables: avg = sum/5
4.) Output the avg to the screen: cout << avg
see that? I just gave you at least of half of how to do it, all you have to do know is initialize the variables, and step 1 (possibly)Comment
Comment