What type of market do mobile phones belong to? This is for comm app/eco app people |
|
| asked by Sidra Haider (sidrahaider) 9 years ago | |
2 | |
Guys i want to print this pattern=> 54321
4321
321
21
1
So i wrote this code
public class HelloWorld
{
public static void main(String[] args)
{ int k=0;
for(int i=5;i>=1;i--)
{
for(int j=i;j>=1;j--)
{
if(j<5)
{
while(k!=i)
{
System.out.print(" ");
k--;
}
}
System.out.print(j);
}System.out.println();
}
}
}
Is it wrong? |
|
| asked by Abhishek Agrawal (agrek) 9 years ago | |
4 | |
