Detail Marks Certificate Program in C++

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
struct res
{
char RegNo[15];
char name[15];
char Fname[15];
char adrs[20];
int marks[6];
};
res s[40];

int obMarks=0, total;

for(int i=0; i<=39; i++)
{
cout<<“\n\n\n”<<setw(45)<<“DETAILED MARKS CERTIFICATE”<<endl<<endl;
cout<<“\n\n\tStudent Name:\t”;
cin>>s[i].name;
cout<<“\n\tFather Name:\t”;
cin>>s[i].Fname;
cout<<“\n\tReg. No. :\t”;
cin>>s[i].RegNo;
cout<<“\n\tAdress :\t”;
cin>>s[i].adrs;
cout<<“\n\n”<<setw(40)<<“Obtained Marks”<<endl<<endl;

for(int j=0; j<=5; j++)
{
cout<<setw(30);
cout<<“Subject”<<(j+1)<<“\t\t”;
cin>>s[i].marks[j];
obMarks=obMarks+s[i].marks[j];
}
total=600;

cout<<“\n\n\tObtained Marks = \t\t”<<obMarks;
cout<<“\n\n\tTotal Marks = \t\t”<<total<<“\n\n\n”;
}
cout<<“\n\n\nPress any key to finish the program”;
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *