Mar 19, 2007

C++ program to add, subtract, multiply and divide two given numbers

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int a,b;
cout <<"enter any number";
cin >> a;
cout <<"enter any number";
cin >> b;
int c=a+b;
cout << c <<endl;
int d=a-b;
cout << d <<endl;
int e=a*b;
cout <<e <<endl;
int f=a/b;
cout << f <<endl;
getch();
}

No comments:

Post a Comment

Infolinks In Text Ads

Total Pageviews

Powered by Blogger.

Dont Forget To Follow Us

Blog Archive