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
Which header file is used for clrscr?
What is the use of static variable in c?
What are the applications of c language?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
code for find determinent of amatrix
What is a list in c?
What are keywords c?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What is the main difference between calloc () and malloc ()?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What are the 5 organizational structures?
What is the general form of #line preprocessor?
If the size of int data type is two bytes, what is the range of signed int data type?
What is line in c preprocessor?