Quiz Week 4: The minimum value and sum of squares

I utilized two functions to do this program, one is in charge of comparing two values and then keep the minor of both, to campare it again with any other value. The other function calculate the sum of the square of given values.

After stablish that, I proceeded to ask the user for the quantity of values that they wanted to introduced, and finally for each number, either negative or positive. To do this succesfully, I first made a comparison and the respective sum between the two first numbers and, for the rest, I set a loop that called the previously mentioned functions.

I opted for adding a conditional that didn’t allow to introduce a smaller number than two for the first question. Also, I added a loop that “clean” the screen.

At the final, the program print the minimum value of introduced numbers and the sum of their squares.

quiz4-1quiz4-2

Leave a comment