How to write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average. The user will enter either an integer to be averaged or a sentinel of 999 indicating that no more numbers are to be entered. When the sentinel is entered, the program will exit the repetition loop. It will then compute and display the average of numbers entered.
Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out?
you should do your own homework, this is fairly easy program. You gotta at least attempt to work on the assignment instead of asking for a solution. What you can do is program it yourself, and if encounter a problem, post code and we can help debugging it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment