The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
For the Week 6 Discussion Main post, create code for a mini calculator. This is the toughest one. Here is what your code must do: (1) A user can enter up to five numbers (input) and must enter at least two numbers. These numbers can be positive or negative. (2) The user can choose to add (combine) or multiply the numbers entered. (3) The code will output the numbers that were input along with the result (either addition or multiplication). (4) The code will allow the user to repeat or to exit. (5) The code should not allow inputs other than positive or negative real valued numbers (like -23, .56, or 7.1, etc). However, if a user enters an invalid input, the code should clear the input and continue, rather than crash or exit. Feel free to do more if you like. NOTES: Remember that addition and subtraction are actually just “combination”. If you add the following numbers: -23, 10, -11, -12, you will get -36. Be sure to use at least one Do/While, one Do/Until, and one FOR loop in your code for practice. As always, include your code and include the .exe. This week's topic will be posted on the discussion board Create a button on the interface for Do/While, Do/Until and For If the user clicks one of these buttons they will enter the numbers into an input box.
...button click
...input box to find out how many numbers they will be entering ...counter loop for/do until/do while from 1 to number that was input simultaneous counters for addition, and multiplication then the culminating code would look something like this MsgBox("The loop has run " & CStr(*variable*) & " times!")
MsgBox("Sum: " & (CStr(*variable*)))
MsgBox("Multiply: " & (CStr(*variable*)) ....etc
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll