Wap in java to print the following pattern:
1 1 1 1 1
3 3 3 3
5 5 5
7 7
9
Answers
Answered by
1
class gg
{
public static void main()
{
int h=1;
for(int I=5;i>0;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(h);
}
h=h+2;
System.out.println(" ");
}
}
}
Similar questions