Searching...
Saturday, 12 November 2016

Calculate sum , subtraction , product , division and modulus of a c program

Calculate sum , subtraction , product , division and modulus of a c program




#include<iostream.h>
using namespace std;
int main()
{
 int a , b , sum , prod , sub ;
double  div , mod;
cout<<"Enter two Numbers  :   ";
cin>>a<<b;
sum = a+b;
sub =a-b;
prod= a*b;
div = a/b;
mod= a%b;
cout<<"Sum is  '"<<sum<<endl;

cout<<"Sub is  '"<<sub<<endl;

cout<<"Divison  is  '"<<div<<endl;
cout<<"prod is  '"<<prod<<endl;
cout<<"Modulud  is  '"<<mod<<endl;

0 comments:

Post a Comment