#include<iostream.h>
#include<stdio.h>
#include<conio.h>
class mul
{
private:
int no1,no2;
public:
void getdata()
{
cout<<"\n Enter the 1st number :";
cin>>no1;
cout<<"\n Enter the 2nd number :";
cin>>no2;
}
void putdata()
{
cout<<"\n \n The 1st number is "<<no1;
cout<<"\n \n The 2nd number is "<<no2;
}
int calmul()
{
int mul1;
mul1=no1*no2;
return(mul1);
}
};
void main()
{
int num;
clrscr();
mul m;
m.getdata();
m.putdata();
num=m.calmul();
cout<<"\n \n The multiplication of two numbers is "<<num;
getch();
}
#include<stdio.h>
#include<conio.h>
class mul
{
private:
int no1,no2;
public:
void getdata()
{
cout<<"\n Enter the 1st number :";
cin>>no1;
cout<<"\n Enter the 2nd number :";
cin>>no2;
}
void putdata()
{
cout<<"\n \n The 1st number is "<<no1;
cout<<"\n \n The 2nd number is "<<no2;
}
int calmul()
{
int mul1;
mul1=no1*no2;
return(mul1);
}
};
void main()
{
int num;
clrscr();
mul m;
m.getdata();
m.putdata();
num=m.calmul();
cout<<"\n \n The multiplication of two numbers is "<<num;
getch();
}
0 comments:
Post a Comment