Question: Problem 1 (35 points): Write a C program that prints either 1) a school of fish on the screen by prompting the user for the


Problem 1 (35 points): Write a C program that prints either 1) a school of fish on the screen by prompting the user for the number of fish to print out 2) mice on the screen by prompting the user for the number of mice to print out Your program should OR Use nested loop (0 point if nested loop is not used) - Work for any numbers of fish or mice entered by a user Note: a) b) Observe the slight difference in the print structure when an odd vs. even number is entered. Observe the difference between the print structure of the school of fish and of mice in a maze. EIGHT examples of code execution are given below Red text entered by the user This program prints 1) a school of fish or 2) mice in a maze Enter your option (1 or 2): 1 How many fish are in the school? 5 This program prints 1) a school of fish or 2) mice in a maze Enter your option ( or 2):2 How many mice in the maze? 5 This program prints 1) a school of fish or 2) mice in a maze Enter your option (1 or 2): 1 How many fish are in the school? 6 This program prints 1) a school of fish or 2) mice in a maze Enter your option (1 or 2): 2 How many mice in the maze? 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
