Writeaprogramthataskstheusertoenterastudent’sgradesonfourexams.The program should display the four grades and the average of the four grades, round- ed to the nearest tenth. To add the grades, use a variable called total_grade, which you should initialize to zero. As the program prompts for and obtains each grade, add the grade to total_grade using the += operator.
1 answer
total_grade=0fori=1to4readscore[i]totalgrade+=score[i]nextiaverage=total_score/4fori=1to4displayi,": ",score[i]nextidisplay"average: ",average