How to Create a marksheet Management Program in C++

#include<conio.h>
#include<iostream.h>
#include<string.h>
class driver
{
char s_name[15][10];
int s_code[10],s_max[10],s_get[10],n,i;
public:
void input();
void output();
void change();
};
void driver::input()
{
clrscr();
cout<<"\nEnter How Many Marks Do You Want To Enter\n";
cin>>n;
    for(i=0;i<n;i++)
    {
    cout<<"\n\tSubject Name     :-\t";cin>>s_name[i];
    cout<<"\n\tSubject Code     :-\t";cin>>s_code[i];
    cout<<"\n\tMaximum Marks    :-\t";cin>>s_max[i];
    cout<<"\n\tMarks Obtained   :-\t";cin>>s_get[i];
    cout<<endl;
    }
}
void driver::output()
{
    for(i=0;i<n;i++)
    {
    cout<<"\n\tSubject Name     :-\t"<<s_name[i];
    cout<<"\n\tSubject Code     :-\t"<<s_code[i];
    cout<<"\n\tMaximum Marks    :-\t"<<s_max[i];
    cout<<"\n\tMarks Obtained   :-\t"<<s_get[i];
    cout<<endl;
    }
}
void driver::change()
{
int temp,s_code1=9999;
cout<<"Enter The Code Of The Subject Wich You Want To Change";
cin>>temp;
for(i=0;i<n;i++)
{
    if(temp==s_code[i])
    s_code1=i;
}
    if(s_code1!=9999)
    {
    cout<<"\n\tSubject Name     :-\t";cin>>s_name[s_code1];
    cout<<"\n\tSubject Code     :-\t";cin>>s_code[s_code1];
    cout<<"\n\tMaximum Marks    :-\t";cin>>s_max[s_code1];
    cout<<"\n\tMarks Obtained   :-\t";cin>>s_get[s_code1];
    }
}
void main()
{
textcolor(111);
clrscr();
driver p;
int me=1;
int m;
while(me)
{
cout<<"Enter 1 For Enter New\nEnter 2 For Change\nEnter 3 For Display\nEnter 4 For Exit\n";
cin>>m;
    switch(m)
    {
    case 1:    p.input();
        break;
    case 2: p.change();
        break;
    case 3: p.output();
        break;
    case 4:    me=0;
        break;
    }
}
getch();
}

How to Create a marksheet Management Program in C++ How to Create a marksheet Management Program in C++ Reviewed by Unknown on 6:17:00 PM Rating: 5

2 comments:

Powered by Blogger.