SOURCE CODE
#include “iostream.h”
#include “conio.h”
class mod
{
int a,b,c;
public:
void getdata();
void display();
};
void mod::getdata()
{
cout << "Enter The Values Of a and b: ";
cin >> a >> b;
}
void mod::display()
{
c=a%b;
cout << "Result Is " << c;
}
void main()
{
mod d;
clrscr();
d.getdata();
d.display();
getch();
}
OUTPUT
Enter The Values Of a and b: 5
2
Result Is 1