write a pgm to print
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
Answer Posted / nisrar
void main()
{
int i,j,k,m;
for(i=1;i<=4;i++)
{
for(j=4;j>i;j--)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("%d",k);
}
for(m=i;m>1;m--)
{
printf("%d",m-1);
}
printf("\n");
}
}
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Explain the advantages and disadvantages of macros.
What does. int *x[](); means ?
What is the need of structure in c?
What is typedf?
Is c language still used?
Explain how many levels deep can include files be nested?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Explain what is wrong with this program statement? Void = 10;
Discuss the function of conditional operator, size of operator and comma operator with examples.
Do pointers take up memory?
What is the difference between a function and a method in c?
What are global variables?
Is c is a procedural language?
Explain the ternary tree?
What is c basic?