Question: JAVA Write a program that prompts the user to enter three integers. Your program should calculate the squares and cubes of those three integers and

JAVA

Write a program that prompts the user to enter three integers. Your program should calculate the squares and cubes of those three integers and print the resulting values in table format as shown below.

Note: you can assume that all integers are positive and the width of each field in the table is 5.

For example:

Input Result
7 14 21
Enter the first integer: Enter the second integer: Enter the third integer: 7 49 343 14 196 2744 21 441 9261

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!