1
232
34543
4567654
can anyone tell me how to slove this c question
Answer Posted / karthick
public class Num
{
public static void main(String[] args)
{
for(int i=1;i<=9;i++)
{
for(int l=9;l>=i;l--)
{
System.out.print(" ");
}
for(int j=i;j>=1;j--)
{
System.out.print(j);
if(j==1)
{
for(int k=2;k<=i;k++)
{
System.out.print(k);
}
}
}
System.out.println(" ");
}
System.out.println("-------------------");
for(int m=9;m>=1;m--)
{
for(int n=9;n>=m;n--)
{
System.out.print(" ");
}
for(int o=m;o>=1;o--)
{
System.out.print(o);
if(o==1)
{
for(int r=2;r<=m;r++)
{
System.out.print(r);
}
}
}System.out.println("");
}
}
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is time complexity c?
write a program for the normal snake games find in most of the mobiles.
Explain why c is faster than c++?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
how many errors in c explain deply
Explain what is the benefit of using an enum rather than a #define constant?
What is structure packing in c?
What is a memory leak? How to avoid it?
How do you determine a file’s attributes?
What is bubble sort in c?
What is floating point constants?
How to implement a packet in C
When can you use a pointer with a function?
What is meant by inheritance?
What does sizeof function do?