A C++ Program that takes three inputs from the user, stores them in variables,performs 4 mathematical operation on them and then displays the result to user.[In addition it also stores the values of mathematical expression used in the code i.e + , -, *,/]

View previous topic View next topic Go down

A C++ Program that takes three inputs from the user, stores them in variables,performs 4 mathematical operation on them and then displays the result to user.[In addition it also stores the values of mathematical expression used in the code i.e + , -, *,/]

Post  Code Maestro on Wed Nov 07, 2012 2:43 pm


Code:
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
   int a,b,c,Sum,Subtraction,Multiplication,Division;
   clrscr();
   cout<<"\n Enter First Number: ";
   cin>>a;
   cout<<"\n Enter Second Number:";
   cin>>b;
   cout<<"\n Enter Third Number:";
   cin>>c;
   Sum=a+b+c;
   Subtraction=a-b-c;
   Multiplication=(a*b)*c;
   Division=(a/b)/c;
   cout<<"\n The Sum Is = "<<Sum;
   cout<<"\n The Subtraction is ="<<Subtraction;
   cout<<"\n The Multiplication is ="<<Multiplication;
   cout<<"\n The Division is ="<<Division;
   getch();
}

Code Maestro

Posts : 100
Join date : 2012-10-31

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum