Pia tunatoa huduma zifuatazo.

Tunatengeneza blogu, tovuti(website), youtube chaneli n.k.. Mawasiliano:
simu:+255763670000, Barua pepe: khalfanm021@gmail.com

Sunday, September 16, 2018

Question aim: Calculating average using a while loop in entering values

Question:  Write a C++ program that asks a teacher to enter marks of five  subjects of his/her student and then calculate the average of the marks entered.
HINT: Use a while loop to iterate the five marks entered, when the fifth mark has been entered, the loop should exit, calculate the average and display the result. Sample output should be;

     Enter marks: 10
     Enter marks: 20
     Enter marks: 30
     Enter marks: 40
     Enter marks: 50
    The average is: 30.00

Solution


PLEASE LEAVE A COMMENT, OR ANY OTHER QUESTIONS INVOLVING ANY OF THE FOLLOWING LANGUAGES, C++, PHP, JAVASCRRIPT, HTML, CSS, MYSQL



No comments:

Post a Comment