English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Need a C Program to create a calculator. The program will accept an arithmetic expression (assumed to be valid expression of only +,-,*,/,1/x and % operations) from the user. Including the above functions this calculator should provide the temporary buffer (memory function), to store and retrive the temporary number values

2007-03-17 05:57:43 · 3 answers · asked by shyam t 1 in Computers & Internet Programming & Design

3 answers

Are you trying to get a friendly advice or to purchase a ware with some moneys?

If you need a friendly advice, instead of using MFC, I can suggest VCL which also offers a great facility to create it.
You can use Borland C++ Builder for developing using VCL or MS Visual C++ for developing using MFC

2007-03-20 22:44:30 · answer #1 · answered by niccie_11 2 · 0 0

Wow, I cannot write the whole program in here, but I can give you a hint on where to start.
MFC is available if you want a graphical interface in C++. Try working with MFC, and you will create one!
Good Luck!

2007-03-17 11:03:27 · answer #2 · answered by A.Samad Shaikh 2 · 0 0

right here's this methodology: /*Written with assistance from Arun a.ok.a The Knight*/ /*artwork ; Calculator with applications */ /*Interface : Command Line */ /*valuable factors : Addition , Subtraction , Multiplication , branch */ #comprise /*function for Addition*/ upload(int a,int b) { clrscr(); c=a+b; go back(c); } /*function for Subtraction*/ sub(int a,int b); { clrscr(); c=a-b; go back(c); } /*function for Multiplication*/ mul(int a,int b) { clrscr(); c=a*b; go back(c); } /*function for branch*/ div(int a,int b) { clrscr(); c=a/b; go back(c): } /*function major*/ major() { int selection,n1,n2,ans; clrscr(); printf("Please opt for : n"); printf("a million.Additionn2.Subtractionn3.M..... scanf("%d",selection); printf("nPlease enter First volume for Calculation : "); scanf("%d",n1); printf("nEnter the 2d volume for Calculation : "); if(selection==a million) { ans=upload(n1,n2); printf("the answer is :%d",ans); } else if(selection==2) { ans=sub(n1,n2); printf("the answer is :%d",ans); } else if(selection==3) { ans=mul(n1,n2); printf("the answer is :%d",ans); } else if(selection==4) { ans=div(n1,n2); printf("the answer is :%d",ans); } /*If a majority of those at the instantaneous are not chosen*/ else { printf("Out Of variety"); } getch(); } [b]I wrote it on my own so plz assemble urself and verify even if it really is nice . and that i'm no longer particular abt the /n i imagine . Plz rectify the blunders urself . My First answer :)[b]

2016-11-26 02:17:29 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers