Write a C program to input two numbers and perform all arithmetic operations. C program to find sum, difference, product, quotient and modulus of two given numbers.
Answers
Answered by
2
//this program is in c++
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,sum,diff,quot,mod,prod;
cout<<"enter the first number ";
cin>>a;
cout<<"enter the second number";
cin>>b;
sum=a+b;
diff=a-b;
prod=a*b;
mod=a%b;
quot=a/b;
cout<<"the sum,diff,quot,mod,prod are"<<sum<<diff<<quot<<mod<<prod;
getch();
}
Similar questions