A good answer might be:Let us use integer values for input and use double precision for the calculation and the result. (It would be OK to use integers for everything.) | |
Application part of the CodeThe application part of the new program will look much like the previous example, except that now there are two values input from the user. This will not much affect the application, but will later on affect the GUI.
As with fahrConvert you could add a few lines of code to make this a non-GUI application (sometimes called a ASCII terminal application.) | |
QUESTION 9:Would the calculation have worked as well? Click Here after you have answered the questionpercent = ( (fatGrams * 9) / calories ) * 100 ; |