Computer Science, asked by shaquib4, 1 year ago

write programs using nested loop to display the following patterns:-

12345
1234
123
12
1

Answers

Answered by sgwaeutraav
7
hey friend,
here's your answer,
hope it helps you....!
Attachments:

Anonymous: was going to answer bt couldn't
sgwaeutraav: y?
Anonymous: sme1 other started answering
sgwaeutraav: oh..better luck nxt tym
Anonymous: yup
Answered by thavneshk
0

Answer:

import java.util.*;

public class theans{

public static void main(){

int i,j;

for(i=5;i>=1;i--){

for(j=1;j<=i;j++){

System.out.print(j);

}

System.out.println();

}

}

}

Enjoy :)

Similar questions