prog for d pattern
123454321
1234 4321
123 321
12 21
1 1
am posting correct answer here:
class figure
{
public static void main(String args[])
{
int i,j,b=0;
for(i=5;i>=1;i--)
{
for(j=1;j<=i;j++)
{
System.out.print(j);
}
for(j=1;j<=b;j++)
{
System.out.print(" ");
}
for(j=i;j>=1;j--)
{
if(j==5)
continue;
System.out.print(j);
}
System.out.println();
if(b==0)
b=b+1;
else
b=b+2;
}
}
} |
|
| asked by Dwaipayan Ray (dwaipayanray1) 10 years ago | |
1 | |
Other Questions on This Topic
Bengali grammar icse question paper can I get? |
|
| asked by Debosmita Malik (debosmitamalik) 11 days ago | |
1 | |
I wish to download question papers for ICSE prelims and I cannot do that. Can you provide the details of the Customer support for Respaper to get in touch with regarding the issue mentioned above. |
|
| asked by S.Hemalata Rajaram (hema1877) 114 days ago | |
1 | |

