www.cprogramming.tk

www.cprogramming.tk

Program to Perform all Mathematical Operations.

A program that perform all mathematical operation on two variables:

This program is written in Dev C++.



using namespace std;
#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=15
a-b=5
a*b=50
a/b=2
a%b=0


Program to Perform all Mathematical Operations. Program to Perform all Mathematical Operations. Reviewed by Shoaib Jameel on 12:53 Rating: 5

No comments:

Powered by Blogger.