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 / abc

void main()
{
int n,i,j;
printf("enter the number");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

646


Is null a keyword in c?

737


What is void pointers in c?

590


Did c have any year 2000 problems?

657


What is switch in c?

647






What are types of functions?

567


What is 'bus error'?

649


What tq means in chat?

582


How do you print only part of a string?

615


Explain union.

638


What are the scope of static variables?

601


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1381


What are pointers? What are different types of pointers?

632


Explain the difference between exit() and _exit() function?

635


How can I open files mentioned on the command line, and parse option flags?

594