Quiz 6

Cout<<“Hello People”<<endl.

Hello again, now I’m posting about my quiz 6 of the course. On this time, we have to create a program who can give the great common denominator between two numbers that the user enter into the program, here the instructions:

The function should receive two integers and return an integer.Obviously you should test your function, so create a main program that asks the user for two values, calculates the gcd and displays that.

It wasn’t too difficult, because we just need an if conditional and a while loop to make the cicle and find the greatest common denominator between the two numbers, and here, the code:

q6.png

And the program on terminal running:

g6

Don’t forget to look my codes on github so you can use it and learn how to make it, also you can add comments !!

https://github.com/eduardomrlsg/TC101/blob/master/Quiz6

Regards. EdMo.

 

CC BY-SA 4.0 Quiz 6 by eduardomoralesg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.