Sunday 10 June 2012

C++ source code for sum,pro,sub,mul,mod.



This is the C++ source code for sum,pro,sub,div,mod.



#include<iostream.h>
#include<conio.h>
 int main()
 {
     int x,y,sum,pro,sub,div,mod;
     x=10;
     y=5;
     sum=x+y;
     pro=x*y;
     sub=x-y;
     div=x/y;
     mod=x%y;
   
     cout<<"sum of x and y="<<sum<<endl;
     cout<<"pro of x and y="<<pro<<endl;
     cout<<"sub of x and y="<<sub<<endl;
     cout<<"div of x and y="<<div<<endl;
     cout<<"mod of x and y="<<mod<<endl;
     getch();
     }
   
End

1 comment: