Question: JAVA PROGRAMMING Download the program named Assignment1.java. The program prompts the user to enter six integers and then displays the integers in tabular 3 rows
JAVA PROGRAMMING Download the program named Assignment1.java. The program prompts the user to enter six integers and then displays the integers in tabular 3 rows by 2 columns format. Modify the program so that the output looks like the output below. The user may enter any values for the integers. //This is code for Assignment1.java import java.util.Scanner; public class Module2Original { public static void main( String [] args ) { // Define and initialize variables for values to be input int v1 = 0; // First value to be input int v2 = 0; // Second value to be input int v3 = 0; // Third value to be input int v4 = 0; // Fourth value to be input int v5 = 0; // Fifth value to be input int v6 = 0; // Sixth value to be input // Use a Scanner to input integer values Scanner input = new Scanner( System.in ); System.out.println( " " ); System.out.print( "Enter 6 integers separated by a blank space:" ); v1 = input.nextInt(); // Input first value v2 = input.nextInt(); // Input second value v3 = input.nextInt(); // Input third value v4 = input.nextInt(); // Input fourth value v5 = input.nextInt(); // Input fifth value v6 = input.nextInt(); // Input sixth value // Output using System.out.println() System.out.println( " " ); System.out.println( "\t" + "Value" + "\t" + "Value" ); System.out.println( "\t" + v1 + "\t" + v2 ); System.out.println( "\t" + v3 + "\t" + v4 ); System.out.println( "\t" + v5 + "\t" + v6 ); System.out.println( " " ); } } Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
