Practice problems for next week
Note: This is a set of problems that will help you in preparing for the lab next week. However, the lab assignment are not going to be identical to these problems.
- Write a procedure that takes in an integer n and prints the sentence: You entered n.
- Write a procedure that takes 2 inputs and returns their product.
- Write a procedure that takes 2 integers and returns 1 if bioth are prime and zero otherwise. Hint: this is easier with a if-then-else steatement, but since we have not covered it, use piecewise().
- Write a procedure that takes 2 integers and returns the
greater one. Do not use if-then-else. Use piecewise().