i need one java program This pattern 1 5 8 10 2 6 9 3 7 4 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

i need one java program This pattern 1 5 8 10 2 6 9 3 7 4

14th May 2018, 1:55 AM
Sripragathiswar
Sripragathiswar - avatar
5 Answers
+ 2
Please try it yourselves first and show us the code so that the community can help you better.
14th May 2018, 2:45 AM
Naveen Maurya
Naveen Maurya - avatar
+ 1
first you creat the pattern which you made and than for the numbers i will be helping you.
14th May 2018, 2:56 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
0
import java.util.Scanner; public class MainClass { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("How many rows you want in this pattern?"); int rows = 4; System.out.println("Here is your pattern....!!!"); for (int i = 4; i <=4; i--) { int num = i; for (int j = 1; j <= i; j++) { System.out.print(num+" "); num = num+rows-j; } System.out.println(); } sc.close(); } }
14th May 2018, 3:07 AM
Sripragathiswar
Sripragathiswar - avatar
0
i got it as reverse
14th May 2018, 3:08 AM
Sripragathiswar
Sripragathiswar - avatar
- 1
i need answer for this from someone
14th May 2018, 2:46 AM
Sripragathiswar
Sripragathiswar - avatar