--Originally published at Solving Problems with Programming
Picture of author
So in this sixth week class I started with doing the #Quiz06 and this WSQ05. Therefore, I started reviewing in creating and calling functions in C++. #Mastery06 AND #Mastery07
What I did for this numeric program is solving the problem to the user by writing a program that asks for the same thing of WSQ01 #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp. Nevertheless, I am writing a function for each calculation. Each function defines two parameters (in this example of type int and float) and return the correct value as an integer as well.
The main program asks the user for the input and then calls each function to calculate the answer for each of the parts.
Remember that in this program needs to have the other points that the post of #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp has:
Solving the problem to the user by asking the user for two integer or float values, then use those two values to calculate and show the following:
- The sum for the two numbers
- The difference of the two numbers
- The product of the two numbers
- The integer based division of the two numbers (so no decimal point). First divided by second.
The resources I need it to solve this program are here:
Similar code made by Eduardo Torres B
The following photograph shows the solution to this problem:
Picture of author
So at first I wrote the same structure of the program just did the same as what i did in Hello World: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp, #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp, #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp, #WSQ03 Post Pick a Number 23/01/17 and WSQ03.cpp
Continue reading "#WSQ05 Six Tutorial On To Functions 12/02/17 and WSQ05.cpp"