How Do You Get This Output When JusT Using 4 Variables, a Loop statement, and 1 scanf. I'm Just New with this Program and I'm Having Trouble Doing This ( My Friend Is Training Me).
Enter a number: 8
Enter a number: 8
Enter a number: 8
Enter a number: 8
Enter a number: 8
Enter a number: 8
Enter a number: 9
Enter a number: 8
Enter a number: 8
Enter a number: 8
Average is : 8.100000
C++ Program Help?
One variable to read in the number (num)
One variable to sum the number (sum = sum + num)
Outside loop one variable for average
avg= sum / loop variable (i)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment