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 |
What is meant by operator precedence?
Can we write a program without main() function?
print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20
Explain can static variables be declared in a header file?
Why preprocessor should come before source code?
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child
how many times of error occur in C
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
How do you define a string?
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none
How to create struct variables?