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
How do I determine whether a character is numeric, alphabetic, and so on?
What does int main () mean?
Can stdout be forced to print somewhere other than the screen?
What is the description for syntax errors?
What is operator promotion?
what do you mean by inline function in C?
What are dangling pointers? How are dangling pointers different from memory leaks?
Why c is faster than c++?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
How can I delete a file?
Who developed c language?
What is this pointer in c plus plus?
What is abstract data structure in c?
Explain what is the use of a semicolon (;) at the end of every program statement?
Differentiate between the = symbol and == symbol?