Program to Perform all Mathematical Operations.
A program that perform all mathematical operation on two variables:
This program is written in Dev C++.
#include<iostream>
#include<conio.h>
int main()
{
int a,b;
a=10;
b=5;
cout<<"a+b="<<a+b<<endl;
cout<<"a-b="<<a-b<<endl;
cout<<"a*b="<<a*b<<endl;
cout<<"a/b="<<a/b<<endl;
cout<<"a%b="<<a%b<<endl;
getch();
return o;
}
Output of the above program
a-b=5
a*b=50
a/b=2
a%b=0
Program to Perform all Mathematical Operations.
Reviewed by Alpha
on
3/05/2017 12:53:00 pm
Rating:
No comments: