12344321
123 321
12 21
1 1 how i print this program??

Answer Posted / venkat

#include<stdio.h>
void main()
{
int i,j,k=4,n=4;
for(i=0;i<n;i++)
{
for(j=1;j<=n-i;j++)
{
printf("%d",j);
}
printf(" ");
for(j=0;j<n-i;j++)
{
printf("%d",k-j);
//k--;
}
--k;
printf("
");
}

}

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what does the format %10.2 mean when included in a printf statement?

934


What is a null pointer in c?

703


code for find determinent of amatrix

1621


What is a null string in c?

682


What is logical error?

714






How can I call a function with an argument list built up at run time?

740


What is structure padding in c?

727


How variables are declared in c?

670


Explain how to reverse singly link list.

703


What is action and transformation in spark?

688


What are the advantages and disadvantages of pointers?

685


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

728


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1625


Can you think of a logic behind the game minesweeper.

2103


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

777