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
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
How arrays can be passed to a user defined function
write a program to rearrange the array such way that all even elements should come first and next come odd
What is the use of function in c?
What is c language used for?
What is union in c?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
What is difference between arrays and pointers?
What is string length in c?
How many identifiers are there in c?
What is data structure in c and its types?
How does normalization of huge pointer works?
what do you mean by inline function in C?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values