Question: Intro to JAVA: Complete the following program to make a table of integers and their square roots. The table should be formatted like this CODE:
Intro to JAVA:
Complete the following program to make a table of integers and their square roots. The table should be formatted like this

CODE:
import java.util.Scanner;
public class Roots { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter a positive integer: "); int n = in.nextInt(); System.out.println(" n | Root of n"); System.out.println("---|----------");
//for loop for (int i = 0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
