0
[SOLVED] please help
Write a C++ program to read 5 different marks and calculate the average using equation: Average = (sum of marks ÷ 500) × 100 You should do this: 1- check the mark if its less than zero or greater than 100, told the user to enter another mark without exit of program. 2- use one of iteration loops. 3- load your .cpp file by using browse my computer button.
10 Réponses
+ 8
You must try, and then ask for help. People won't do your homework for you.
+ 7
Is this homework?
+ 1
Show us what you have so far and where it's not working
+ 1
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int mark[5], i;
float sum=0;
cout<<"Enter marks obtained in Physics, Chemistry, Maths, CS, English :";
for(i=0; i<5; i++)
{
cin>>mark[i];
sum=sum+mark[i];
}
float avg=sum/5;
float perc;
perc=(sum/500)*100;
cout<<"Average Marks = "<<avg;
cout<<"\nPercentage = "<<perc<<"%";
getch();
}
+ 1
Thanks
+ 1
Abdulrhman from a quick look it looks ok. Only thing that is missing is point 1.
0
Yes homework
0
Please help me
0
I tried but I became totally ignorant of the fact that I was not familiar with programming
0
Yes