Question: 1. (10pts) Write an application that asks the user for a number from -9 to 9...continually ask the user for an integer in the appropriate
1. (10pts) Write an application that asks the user for a number from -9 to 9...continually ask the user for an integer in the appropriate range if they do not give you a number in the interval [-9, 9], your program should then display a table that shows each number from 0 up or down to the number entered, its square, and its cube . The table must be aligned as follows (HINT: there is an escape sequence that may help left align). Your code must use a loop of some kind for iterating up/down to the appropriate number Sample Output What nunber? 4 3 9 27 4 16 64 2. (10pts) Write an application that asks the user for exactly a 4 digit number (MUST be an integer number, and read in as such). You can assume that user will enter it in the proper format, if you want to add in checks to make sure the user entered it properly that is up to you and is NOT required. Given the number, use mathematics to find each digit and display that number vertically You MUST use arithmetie operations to do this, do NOT convert it to a String and use charAt() ? yes I know it is easier HINT: modulus and division are very useful. Sample Output What nunber 4936 3. (10pts) Write a program that asks the user for some text and outputs each letter of the input on a new line: Sample Output Enter a phrase: Cody You say
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
