Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<iostream.h>
- class A
- {
- public:
- void dif(int a,int b)
- {
- if(a==b)
- {
- cout<<"\nnum1 and num2" <<"both are same";
- }
- else
- {
- if(a>b)
- {
- cout<<endl<<a<<" is biggest";
- }
- else
- {
- cout<<endl<<b<<" is biggest";
- }
- }
- }
- };
- int main()
- {
- A a1;
- int a,b;
- clrscr();
- cout<<"\nEnter the Num1 => ";
- cin>>a;
- cout<<"\nEnter the Num2 => ";
- cin>>b;
- a1.dif(a,b);
- getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment