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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / anurag
#include<iostream>
using namespace std;
int main()
{
int a=4;
for(int i=0;i<=4;i++)
{
int j=0;
while(j<=i)
{
cout<<j;
j+=1;
}
cout<<endl;
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
a simple c program using 'for' loop to display the output 5 4 3 2 1
In which language linux is written?
marge linklist
Why data types in all programming languages have some range? Why ritche have disigned first time likethat?Why not a single data type can support all other types?
what do you mean by defining a variable in our c code?
how can we print hellow world programme without using semicolon
void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }
why r u join this company? give solid resons.
16 Answers IBM, Infosys, TCS,
What is an identifier?
How do you construct an increment statement or decrement statement in C?
Tell me can the size of an array be declared at runtime?
without a terminator how can we print a message in a printf () function.