in Education by
HOW TO PRINT THE FOLLOWING PATTERN IN JAVA 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5 Select the correct answer from above options

1 Answer

0 votes
by
In Java Programming how to print the pattern of 13 numbers , the steps are given as follows : import java.util.*; class np13 { public static void main(String args[]) { int i,j,n; Scanner sc = new Scanner(System.in); System.out.println(“Enter the no of lines”); n=sc.nextInt(); for(i=n;i>=1;i–) { for(j=n;j>=i;j++) { System.out.print(j); } System.out.println(“”); } } } Note : The above steps are in separate lines only. Because of LaTeX problem they may appear colliding. I am sorry for that.

Related questions

0 votes
    following Python Write the output for the Codes i A : 41:100, 2:200, 3: 300, 4:400,5:5003 Print A items ( ... Keys () Print A values ) Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    >>> list(range(0, -9,-1)) will print [-1, -2, -3, -4,-5, -6, -7, -8) [0,-1, -2, -3, -4,-5, -6, -7, -8 ... [0,-1, -2, -3, -4,-5, -6, -7] Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    Write a program in java to display the given pattern. 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Please ... as brainlist Please answer it very fast Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    Predict the output of the following: Print(52*7) Print(“52*7”) Print(“52*7=”,52*7) Print(“52″*7) Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    EJ Write T for true and F for false. 71. Input devices are used to store the data. 2. Calculations are done ... is a system software. Select the correct answer from above options...
asked Dec 6, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    1.) The following program is supposed to print the following pattern. Some part of the program is replaced by _n__ where ... (); } } } Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    Using nested loop write a program to print the following pattern on the screen. 12345 23451 34512 45123 51234 Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Dec 7, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    How many members in the Lok Sabha can be nominated by the President of India? (a) 2 (b) 3 (c) 4 (d) 5 Select the correct answer from above options...
asked Aug 3, 2022 in Education by JackTerrance
0 votes
    Question No.1: What do you understand about container tag and empty tag, give example? Question No.2: What do ... all the attributes? Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
...