Write a program in c to print
1
121
12321
1234321
123454321

Answer Posted / durai

int a, b;
for( a=1;i<=5;a++)
{
for(b=1;b<=(2*a-1);b++)
{ if(b<=a)
printf b;
else
printf(2*a-b);
}
printf
;
}

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete a node from linked list w/o using collectons?

2184


What is your stream meaning?

720


What is this pointer in c plus plus?

697


What is the c value paradox and how is it explained?

679


Write a C program to count the number of email on text

1510






Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

753


What is the best way to comment out a section of code that contains comments?

906


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

743


Why can arithmetic operations not be performed on void pointers?

706


differentiate built-in functions and user – defined functions.

745


How would you rename a function in C?

704


What are the advantage of c language?

644


can any one provide me the notes of data structure for ignou cs-62 paper

1791


I came across some code that puts a (void) cast before each call to printf. Why?

805


What is a macro, and explain how do you use it?

707