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
What type is sizeof?
Is there a built-in function in C that can be used for sorting data?
What are void pointers in c?
What is the use of header?
Is c a great language, or what?
What are the different types of objects used in c?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
Why static variable is used in c?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
How can I make it pause before closing the program output window?
What is d'n in c?
Explain what is the purpose of "extern" keyword in a function declaration?
Where register variables are stored in c?
How do you view the path?