Advertisement

Search Here

Wednesday, 26 March 2014

Ultimate Calculator Making Using C++

The Code of Ultimate Calculator is

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float a,b,one,two,three,four;
cout<<"Enter First Number\n"<<endl;
cin>>a;
cout<<"Enter Second Number\n"<<endl;
cin>>b;
cout<<"Select One Option\n"<<endl;
cout<<"one for Addition\ntwo for Substraction\nthree for Multiplication\nfour for Division"<<endl;
cin>>one;
cout<<a+b<<endl;
cin>>two;
cout<<a-b<<endl;
cin>>three;
cout<<a*b<<endl;
cin>>four;
cout<<a/b<<endl;
getch();
}

Screen Shot: 
Program In C++

 

Result

 

No comments:

Post a Comment