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 is the difference between int main and void main in c?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
What is time complexity c?
What does the file stdio.h contain?
How can you read a directory in a C program?
List some applications of c programming language?
Explain what is a program flowchart and explain how does it help in writing a program?
What is C language ?
The difference between printf and fprintf is ?
What is the use of function overloading in C?
i have a written test for microland please give me test pattern
Is linux written in c?
What is volatile, register definition in C
How to get string length of given string in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only