Write a complete Java program called Rooter that gets a positive integer called start from the user at the command line and then finds the square root of every number from start down to 0. Use a while loop to count down. Print each square root on a separate line. Use the Math.sqrt(double a) method to find each square root. Write a complete Java program called Averager to get positive numbers (doubles) from the user at the command line until they enter -1 (the sentinel). Use do-while for your loop. Compute the average of the series of numbers and print the average to the command line. Write a Java program called PowTable that uses nested for loops to print a table of the numbers 1 through 9 raised to the 2nd, 3rd, and 4th power. Review the Math.pow(double, a, double b) method. Review the below output. Use the outer and inner loop counters as the arguments to Math.pow(). Make sure to include the row and column headings.
Get Free Quote!
427 Experts Online