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.

30th Apr 2018, 11:37 AM
Abdulrhman
10 Antworten
+ 8
You must try, and then ask for help. People won't do your homework for you.
30th Apr 2018, 11:49 AM
Fox
Fox - avatar
+ 7
Is this homework?
30th Apr 2018, 11:46 AM
Fox
Fox - avatar
+ 1
Show us what you have so far and where it's not working
30th Apr 2018, 11:52 AM
🤖 Basile Laderchi
+ 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(); }
30th Apr 2018, 12:04 PM
Abdulrhman
+ 1
Thanks
30th Apr 2018, 1:20 PM
Abdulrhman
+ 1
Abdulrhman from a quick look it looks ok. Only thing that is missing is point 1.
30th Apr 2018, 1:23 PM
🤖 Basile Laderchi
0
Yes homework
30th Apr 2018, 11:47 AM
Abdulrhman
0
Please help me
30th Apr 2018, 11:47 AM
Abdulrhman
0
I tried but I became totally ignorant of the fact that I was not familiar with programming
30th Apr 2018, 11:52 AM
Abdulrhman
0
Yes
30th Apr 2018, 1:24 PM
Abdulrhman