Untitled
unknown
plain_text
a year ago
466 B
2
Indexable
Never
#include<iostream> #include<string> #include<conio.h> using namespace std; class student { int rollno; string name; public: void get_data(); void put_data(); }; void student:: get_data() { cout<<"Enter roll number:"; cin>>rollno; cout<<"Enter name:"; cin>>name; } void student:: put_data() { cout<<"Roll number is :"<<" "<<rollno<<"\n Name is :"<<name; } int main() { student s; s.get_data(); s.put_data(); return 0;