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
State the difference between realloc and free.
What is a program flowchart and how does it help in writing a program?
What is identifier in c?
What are the various types of control structures in programming?
Does c have circular shift operators?
What is "Duff's Device"?
What do you mean by a local block?
What is the difference between Printf(..) and sprint(...) ?
Explain what is the benefit of using #define to declare a constant?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is the difference between the expression “++a” and “a++”?
What is dynamic memory allocation?
What is the mean of function?
What is void main () in c?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321