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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What are the functions to open and close the file in c language?
What is bash c?
If errno contains a nonzero number, is there an error?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What is variable declaration and definition in c?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
Are pointers integers in c?
Why do we use & in c?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Can we declare a function inside a function in c?
Distinguish between actual and formal arguments.
Explain what are compound statements?
What is static memory allocation?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?