This is the source code for making basic calculator in c++
#include<iostream.h>
#include<conio.h>
main()
{
float x,y;
char op;
cout<<"enter first value,arithematic operator and second value:";
cin>>x>>op>>y;
if(op=='+')
cout<<x+y;
else if(op=='-')
cout<<x-y;
else if(op=='*')
cout<<x*y;
else if(op=='/')
cout<<x/y;
else
cout<<"invalid operator %%%%%%%%%";
getch();
}
End
c++ calculator source code
thank you for sharing nice article in your blog
ReplyDeletevisit
web programming tutorial
welookups
ReplyDeletenice article for beginners.thank you.
javacodegeeks