+ 1
i need one java program This pattern 1 5 8 10 2 6 9 3 7 4
5 Respostas
+ 2
Please try it yourselves first and show us the code so that the community can help you better.
+ 1
first you creat the pattern which you made and than for the numbers i will be helping you.
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();
}
}
0
i got it as reverse
- 1
i need answer for this from someone