programming-examples/c++/_Basic/Add subtract multiply divide.cpp
2019-11-15 12:59:38 +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;
}