programming-examples/c++/Basic/Add subtract multiply divide.cpp
2019-11-18 14:44:36 +01:00

19 lines
490 B
C++

#include < iostream.h >
int main()
{
int first, second, add, subtract, multiply;
float divide;
cout<<"Enter two integers\n";
cin>>first>>second;
add = first + second;
subtract = first - second;
multiply = first * second;
divide = first / (float)second;
//typecasting
cout<<"Sum = "<<add<<"\n";
cout<<"Difference ="<<subtract<<"\n";
cout<<"Multiplication ="<<multiply<<"\n";
cout<<"Division ="<<divide<<"\n";
return 0;
}