#include<iostream>
using namespace std;
class student
{
    char name[10];
    int rollno,m1,m2,m3,tot;
    float avg;
    public:
    void getdata();
    void process();
    void putdata();
};
void student::getdata()
{
    cout<<"Enter the name :"<<endl;
    cin>>name;
    cout<<"Roll no :"<<endl;
    cin>>rollno;
    cout<<"Enter the marks :"<<endl;
    cin>>m1>>m2>>m3;
}
void student::process()
{
    tot=m1+m2+m3;
    avg=tot/3;
}
void student::putdata()
{
    cout<<"NAME:"<<name<<endl;
    cout<<"ROLL NO:"<<rollno<<endl;
    cout<<"TAMIL:"<<m1<<endl;
    cout<<"ENGLISH:"<<m2<<endl;
    cout<<"MATHS:"<<m3<<endl;
    cout<<"TOTAL:"<<tot<<endl;
    cout<<"AVERAGE:"<<avg<<endl;
}
int main() {
      cout<<"STUDENT MARKLIST"<<endl;
    student x;
    x.getdata();
    x.process();
    x.putdata();

    return 0;
}




Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: