JAVA PATTERN PROGRAM
JAVA PROGRAMS
Hi Guys , here is the solution to the java output program submitted to me by Sourodeep.
Q; OUTPUT :
12345
23451
34521
45321
54321
SOLUTION :
class deb
{
public static void main(String args[])
{
int p= 1,k;
for(int i =1;i<=5;i++)
{
for(int j=i;j<=5;j++)
System.out.print(j);
for( k=i-1;k>0;k--)
System.out.print(k);
System.out.println();
}
}
}
-DEBJEET BANERJEE
Comments
Post a Comment