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
Why we write conio h in c?
write a program to print data of 5 five students with structures?
Explain how do you generate random numbers in c?
explain what is fifo?
How do you redirect a standard stream?
What are the two forms of #include directive?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Explain what is wrong with this statement? Myname = ?robin?;
using only #include
What is extern c used for?
What is an auto keyword in c?
What is the use of clrscr?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What are conditional operators in C?
How does struct work in c?