Quiz Week 4

squares flickr photo by amseaman shared under a Creative Commons (BY-NC-ND) license

Minimum and Squares

For this quiz I want you to (in class) create a program with two functions:

  • int minimumThree(int x, int y, int z){ }  // returns the value that is smallest of x, y and z
  • int sumSquares(int x, int y, int z) {}  // returns the value of the sum of squares of x, y, z

What to Do

You implement these function in your own program in a file quiz4.cpp.

You should make a main routine that asks the user for three numbers and then calls your functions to which should *RETURN* the value and you print in the main program.

Publish your code on your own blog today (during class time is best) and use the tag #Quiz04 so it shows up nicely in our tag cloud.

Feature Image Credit

<a title="squares" href="https://flickr.com/photos/inthe-arena/7216039450">squares</a> flickr photo by <a href="https://flickr.com/people/inthe-arena">amseaman</a> shared under a <a href="https://creativecommons.org/licenses/by-nc-nd/2.0/">Creative Commons (BY-NC-ND) license</a> </small>
squares flickr photo by amseaman shared under a Creative Commons (BY-NC-ND) license

CC BY-SA 4.0 Quiz Week 4 by admin is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.