Quiz 2

This program use a function called superpower that has receives two parameters (ints) and returns an integer which is first parameter raised to the power of the second, which is to say it returns a b . There are many ways to do this, but the intent is for you to use a loop or recursion.

quiz2-1

This program use a function called stars that has one parameter of type integer and PRINTS that many stars on a single line, so if we call the function with stars(5), the function will print like this: *****

quiz2-2

 

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