Ok, you’re doing it fine, but things are not that easier, so we’re going to increase the level according to how we advance in this course.
In this program we’re required to:
Ask the user for two integer values, then use those two values to calculate and show the following:
- 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 remainder of integer division of the two numbers.
Fine, seems not too easy, but it is, so, we’re going to start with the integers you have to ask for your program:
The next step is what we saw last WSQ, the “prints”: (Don’t forget that the task asks us for an integer division so the operation command for an integer division is // not /, so becareful).
And that’s it, we’re almost done. By last, we have to run our code to prove it works:
I’ll leave you the full code here:
Pretty easy, right? But we have to continue, let’s keep going.
#WSQ03 – Fun With Numbers by manuelmendezhijar is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.