//tested In Dev C++
#include<iostream>
#include<conio.h>
using namespace std;
class std
{
int rno;
char name[50];
public:
inline void get()
{
cout<<"Enter Marks";
cin>>rno;
cout<<"Name :";
cin>>name;
}
void disp()
{
cout<<"Name Is:"<<name;
cout<<"Marks:"<<rno;
}
}s;
main()
{
s.get();
s.disp();
}
#include<iostream>
#include<conio.h>
using namespace std;
class std
{
int rno;
char name[50];
public:
inline void get()
{
cout<<"Enter Marks";
cin>>rno;
cout<<"Name :";
cin>>name;
}
void disp()
{
cout<<"Name Is:"<<name;
cout<<"Marks:"<<rno;
}
}s;
main()
{
s.get();
s.disp();
}
No comments:
Post a Comment