Input any no. and print all the the numbers that comes
before it like this
for e.g input = 4
0
01
012
0123
01234
plz answer it 2day
Answer Posted / vadivelt
#include<stdio.h>
#include<conio.h>
void main()
{
int no, i, j;
printf("ENTER THE NO:\n");
scanf("%d", &no);
printf("\nOUTPUT IS:\n");
for(i = 0; i<=no; i++)
{
for(j=0; j<=i; j++)
{
printf("%d", j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
How can I make it pause before closing the program output window?
What is the difference between class and object in c?
Write a program to print “hello world” without using semicolon?
Are pointers integer?
how do you execute a c program in unix.
I need previous papers of CSC.......plz help out by posting them.......
What is the usage of the pointer in c?
What are disadvantages of C language.
Explain About fork()?
Are there any problems with performing mathematical operations on different variable types?
What is use of #include in c?
What tq means in chat?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
How do I create a directory? How do I remove a directory (and its contents)?
what do you mean by inline function in C?