1.

Wap in java to print the following pattern:1 1 1 1 13 3 3 35 5 57 79

Answer»

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(" ");

}

}

}



Discussion

No Comment Found