A few days ago
Anonymous

really need help with C++ programming?

well i have this assignment for my computer programming class and the homework is that you are suppose to input 5 grades and print out the average of the grades. I did that, but what more is that they also need me to state the number of marks less than 70%. Can anyone help me wid it plz? i dont know how to make the program read each input and tell how many grades are below 70. Thank you for ur kind help

Top 1 Answers
A few days ago
rhyona

Favorite Answer

i am writing the program assuming you have a basic knowledge of arrays and for loop(if not please mail me i will write a simpler version)

if you have any doubts regardin the program please mail me.

#include

#include

void main()

{

clrscr();

int arr[5],i,sum=0,count=0;

float avg;

cout<<"please enter the five grades"; for(i=0;i<5;i++) {cin>>arr[i];

}

for(i=0;i<5;i++) {sum+=arr[i]; } avg=sum/5; cout<

0