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 program to concatenation the string using switch case?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Define VARIABLE?
What are the different types of control structures in programming?
What is keyword in c?
diff between exptected result and requirement?
When can you use a pointer with a function?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
What is non linear data structure in c?
Explain the difference between the local variable and global variable in c?
In a switch statement, explain what will happen if a break statement is omitted?
Differentiate between a for loop and a while loop? What are it uses?
What does the format %10.2 mean when included in a printf statement?
Explain how can I pad a string to a known length?
Can the size of an array be declared at runtime?