Fun with Numbers #WSQ03

Task today was to ask for 2 integer numbers in order to do various mathematical operations.

  • 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.
  • And as a bonus, addition.

First ask for the numbers:

Screenshot4.1

Second, write the commands the program will run:

Screenshot4.2

Third, thing to do is to compile your program.

Screenshot4.3.png

Next, you must run it

Screenshot4.4

And there you have it… Really simple program, but I had help from my friend Christian, because he knows more than me 😀

 

5397869877_ce1fd0e087_z
.numbers by: .Thomas Alexander https://www.flickr.com/photos/thomasspeller/5397869877/in/photolist-9dZuE2-fcVveb-dJQF46-ipz26T-y9DdY-wiAw81-5NnYx5-fQ6qDt-6UtG9S-kD9Lqt-Cas4r9-466Ys3-7gpM2X-5pmhD5-6px3YT-7r4UdN-bFwnMH-4CzFUi-6pBcjh-jXBuPc-9rLSJU-eiMSjS-51NuHQ-9UAzzu-AzrwCH-aYjhbM-orXCLa-6mCuiz-kaLZFH-5Y6Zhn-eZ8wJY-7H8vPq-3KxvG-r4m9Jk-5peSdV-4Ne9WF-65W2Xp-jr9JBi-p8ZxD6-kAtk2a-c8agC-9A4eFW-uuRGf7-9fdyfV-4umSgE-9djrNk-fwQwZH-uAVhM-3ZwQB4-4hkQiy

 

CC BY-SA 4.0 Fun with Numbers #WSQ03 by canadamike17 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.