CPPForSchool.com: Flow of Control Set 2: Assignment 5
5.
Write a program to reverse any given integer number.
It appears that this assignment had a typo. Originally, it was listed as "... reveres any given number." Through deductive reasoning, it makes sense for it to actually be listed as "reverse" because "reveres" is not a word I can find anywhere.
Nevertheless, in order to accomplish this assignment, I will need to utilize the modulo operator once again. Admittedly, I had performed additional research to ensure that my approach would be correct. Ultimately, I settled with the example provided by Programiz. Below is my source code, inspired by the Programiz version.
Of course, I had to test it with the example variables. It worked successfully. Comparison screenshots below.
It appears that this assignment had a typo. Originally, it was listed as "... reveres any given number." Through deductive reasoning, it makes sense for it to actually be listed as "reverse" because "reveres" is not a word I can find anywhere.
Nevertheless, in order to accomplish this assignment, I will need to utilize the modulo operator once again. Admittedly, I had performed additional research to ensure that my approach would be correct. Ultimately, I settled with the example provided by Programiz. Below is my source code, inspired by the Programiz version.
Of course, I had to test it with the example variables. It worked successfully. Comparison screenshots below.
Comments
Post a Comment