What's new

Help Coding programming

Shyepw009

Eternal Poster
Established
maam/sir paturo po kung anong mali ko po kasi nag cocomplicated terminated po slamat po

#include<iostream.h>
using namespace std;

void main()
{
int no, i;
float marks[10], per=0, total=0;
clrscr();
cout<<"Enter number of subject: ";
cin>>no;
cout<<"Enter marks of "<<no<<" subject: ";
for(i=0; i<no; i++)
{
cin>>marks;
}
for(i=0; i<no; i++)
{
total=total+marks;
}
per=total/no;
cout<<"Percentage: "<<per<<" %" <<endl;
if(per>85) {
cout<<"A grade";
}
else if(per<85 && per>=75)
{
cout<<"B grade";
}
else if(per<75 && per>=50)
{
cout<<"C grade";
}
else if(per<50 && per>=30)
{
cout<<"D grade";
}
else
{
cout<<"Fail";
}
getch();
}
 
madami errors po but before that kindly recheck line #1
tapos wrong section ka po nagpost
sir Draft pa manage po nito naliligaw pa ata haha
 
Last edited:

Similar threads

Back
Top