| | |
How do you build the dot in calculator.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 5
Reputation:
Solved Threads: 0
I am trying to build a scientific calculator. However, I have two major problems.
1. The decimal to separate the tens from the tenth
2. Modulus which outputs the remainder of the division of two numbers.
Remainder = dividend – quotient * divisor;
I can get the rest, but I am having problems on how to input these into programming. If anyone knows how to use this for Visual C++.net, please help. Also, I am using GUI (Graphics User Interface). I am suppose to build a modulus button.
1. The decimal to separate the tens from the tenth
2. Modulus which outputs the remainder of the division of two numbers.
Remainder = dividend – quotient * divisor;
I can get the rest, but I am having problems on how to input these into programming. If anyone knows how to use this for Visual C++.net, please help. Also, I am using GUI (Graphics User Interface). I am suppose to build a modulus button.
I'm reading your post and I can't really get what the problem is, especially with the decimal.. The reminder you can find using the % operator. More information and details you can find here: http://www.intap.net/~drw/cpp/cpp03_04.htm
•
•
Join Date: Jul 2005
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by freemind
I'm reading your post and I can't really get what the problem is, especially with the decimal.. The reminder you can find using the % operator. More information and details you can find here: http://www.intap.net/~drw/cpp/cpp03_04.htm
I made the calculator using GUI(Windows application systems). BUt, what do I do to make the decimal come out. LIke 12.25 multiply by 3.74, so that a decimal number comes out.
Also, thanks for the website. So, will C++.net recognize the modulus. So i was thinking like placing
output = op1( input of first number) % op2( input of second number)
textbox1::text-> output.string()
So, should this work. I mean, will it recognize the % as modulus.
•
•
Join Date: Jul 2005
Posts: 1,675
Reputation:
Solved Threads: 261
Many GUI programs don't recognize input as anything but strings. They validate the string input and then convert the string input into a type that is appropriate for calculations, do the calculations, then display the report again as a string. If that's the way your system works, then there are several options including strtod(), atoi(), stringstreams, sprintf(), etc. to perform the conversions once user has provided original input.
•
•
•
•
Originally Posted by mugilan
can anybdy help on this question......write a program that uses a for statement to calculate and print the average of several integers. assume the last value read is the sentinel 9999. a typical input sequence might be.
10.....8......11.....7.....9.......9999
![]() |
Similar Threads
- Object Orientated C+++.net Calculator! (C++)
- Calculator Logic (VB.NET)
- Calculator Functions: () needed? (Geeks' Lounge)
Other Threads in the C++ Forum
- Previous Thread: help plz!
- Next Thread: Why is VC++ 2005 beta2 telling me this
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count database delete deploy desktop developer directshow dll dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelp homeworkhelper iamthwee ifstream input int integer lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





