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
Is multithreading possible in c?
Explain what are reserved words?
How can I run c program?
What is storage class?
Can we replace the struct function in tree syntax with a union?
write a program to generate address labels using structures?
regarding pointers concept
What is C language ?
Is c easier than java?
#include
What is getch () for?
What is #define used for in c?
What is operator promotion?
how to count no of words,characters,lines in a paragraph.
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?