Computer Science, asked by Nik7117, 1 year ago

write a program in Java to print the following pattern

Attachments:

Answers

Answered by Anonymous
3
let me tell u the logic as i dont know java programming
look at the pattern it shows 2 inverted triangle 
first building the logic for inverted triangle
from the first row the column decrements
so use the loop
for(i=1;i<=5;i++)
and the inner loop
for(j=1;j<=i;j--)
and in the same way for the other triangle
then add a for loop for both the triangles





Nik7117: thanks
Similar questions