Question
These are the questions I have to do on my assignment: 1) Write, test, and debug (if necessary) a Ruby program with the following specification:
These are the questions I have to do on my assignment:
1) Write, test, and debug (if necessary) a Ruby program with the following specification:
Input: Three numbers, a, b, and c, each on its own line, from the keyboard.
Output: The value of the expression 10ab-((c-1)/17.44).
-------------------------------------------------------------------------------
2) Write, test, and debug (if necessary) a Ruby program with the following specification:
Input: Three names, on separate lines, from the keyboard.
Output: The input names in alphabetical order. Do not use arrays.
--------------------------------------------------------------------------------------
3) Write, test, and debug (if necessary) a Ruby program with the following specification:
Input: A list of numbers from the keyboard.
Output: Two lists of numbers, one with input numbers greater than zero and one with those less than zero (ignore the zero-valued numbers). You must first build two arrays with the required output numbers before you display any of them.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started