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 does the characters “r” and “w” mean when writing programs that will make use of files?
What is a method in c?
How many header files are in c?
What is hashing in c language?
What is a double c?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
What is a union?
Can the “if” function be used in comparing strings?
what are the 10 different models of writing an addition program in C language?
How can I determine whether a machines byte order is big-endian or little-endian?
What is an lvalue in c?
What is the scope of global variable in c?
simple program of graphics and their output display
What is a static function in c?
What is the return type of sizeof?