- #include<iostream.h>
- #include<conio.h>
- class C
- {
- private:
- int x,y;
- public:
- void show(int a,int b)
- {
- gotoxy(28,15);
- cout<<"sum = "<<a+b;
- gotoxy(28,16);
- cout<<"sub = "<<a-b;
- gotoxy(28,17);
- cout<<"Mult = "<<a*b;
- gotoxy(28,18);
- cout<<"div = "<<a/b;
- gotoxy(28,20);
- cout<<"total = "<<((a+b)+(a-b)+(a*b)+(a/b));
- gotoxy(28,21);
- cout<<"total Average = "<<(((a+b)+(a-b)+(a*b)+(a/b))/2);
- }
- void show1(int w,int v)
- {
- gotoxy(1,15);
- cout<<"sum = "<<w+v;
- gotoxy(1,16);
- cout<<"suv = "<<w-v;
- gotoxy(1,17);
- cout<<"Mult = "<<w*v;
- gotoxy(1,18);
- cout<<"div = "<<w/v;
- gotoxy(1,20);
- cout<<"total = "<<((w+v)+(w-v)+(w*v)+(w/v));
- gotoxy(1,21);
- cout<<"total averwge = "<<(((w+v)+(w-v)+(w*v)+(w/v))/2);
- }
- };
- void main()
- {
- C l;
- l.show(2,3);
- int j,k;
- gotoxy(10,1);
- cout<<"please input 2 numbers for perform = "<<endl;
- cin>>j>>k;
- l.show1(j,k);
- getch();
- }
Purpose of this blog is to make programming easy , weak programmers may get help from my blog i tried my best to post some of my codes in form of easiest approach, I think this blog is perfect c++ guide in form of online blog. please consult my all codes and suggest all of it with your class mates. Share experiences & knowledge with your juniors. Make yourself habitual to write different programs for 2 hours a day daily.