how can i make a program with this kind of output..
Enter a number: 5
0
01
012
0123
01234
012345
01234
0123
012
01
0
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("enter the limit value :");
scanf("%d",&m);
for(int i=0;i<(2*n+1);i++)
{
printf("\n");
if(i<n)
{
for(int j=0;j<=i;j++)
printf("%d",j);
}
else
{
for(int k=0;k<=j;k++)
printf("%d",k);
j--
}
}
getch();
}
| Is This Answer Correct ? | 11 Yes | 6 No |
Post New Answer View All Answers
What is the use of typedef in structure in c?
What is the use of void pointer and null pointer in c language?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What is calloc() function?
Suggesting that there can be 62 seconds in a minute?
Explain the term printf() and scanf() used in c language?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Why does this code crash?
What are the types of data structures in c?
How to compare array with pointer in c?
What is boolean in c?
Why is c used in embedded systems?
why return type of main is not necessary in linux
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is ambagious result in C? explain with an example.