Answered You can hire a professional tutor to get the answer.

QUESTION

Write a Ruby program which continuously reads in a number, x, from the screen, and then computes and displays its:

1. Write a Ruby program which continuously reads in a number, x, from the screen, and then computes and displays its:(i) factorial, if x is less than 15;ii) fourth power, if 15 < x ≤ 35 andiii) square, if x > 35.Your program should run until the user wishes to stop running it. In other words, after processing the first number, it should ask the user if he or she wants to continue. If the answer is no the program terminates; if the answer is yes it reads in another number, processes it and asks the user again until the user says no.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question