Question: Write the pseudocode for the following problems: 1. Ask the user to enter a number. If the number is even output You entered an even

Write the pseudocode for the following problems:

1. Ask the user to enter a number. If the number is even output "You entered an even number. Good job!"

2. Ask the user to enter two fruits. If the first fruit comes before the second fruit alphabetically, output "[Fruit 1] comes before [Fruit 2] alphabetically". Otherwise, output "[Fruit 2] comes before [Fruit 1] alphabetically". Example: User enters "Apple" User enters "Pear" Expected output: "Apple comes before Pear alphabetically"

3. Write aprogram that contains a module called "max" that takes in two(2) numbers as arguments (user will input the numbers). It will return the number that is the greater of the two. IF the numbers are the same, it will return either number. After returning the number, output "The max number is [number]"

* Hint: You will need multiple If statements.

Make sure to include in each program the following:

* Main module

* Comments above main describing the function of the program. You can add other comments as well.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!