1 2 3 4 5
6 7 8 9
10 11 12
13 14
15
tell syntax of pattern in java
Answers
Answered by
0
Answer:
if you carefully 123...are written countinuosly but the first is written up-to 5in 1 row after that in a row decreases 5,4,3,2,1 so, numbers in a row are decreasing.
Answered by
0
Answer:
class A
{
public static void main(String args[])
{int count=0;
for(int I=1,r=5;I<=15;)
{
while(count<=r)
{count= count++;
System.out.println(I);
I++;
}
r--;
}
}
Similar questions