#include<iostream>
using namespace std;
class student{
private:
int roll_number;
string name;
double score;
string remarks;
public:
void input(){
cout<<"Enter student roll number: \n";
cin>>roll_number;
cout<<"Enter the student name:\n";
cin>>name;
cout<<"Enter student score:\n";
cin>>score;
cout<<"Enter student remarks:\n";
cin>>remarks;
}
void view(){
cout<<"Roll number: "<<roll_number<<endl;
cout<<"Name: "<<name<<endl;
cout<<"Score: "<<score<<endl;
cout<<"Remark: "<<remarks<<endl;
}
};
int main(){
student st;
st.input();
st.view();
}
Comments
Leave a comment