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

Is null a keyword in c?

741


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

946


Function calling procedures? and their differences? Why should one go for Call by Reference?

639


Is c programming hard?

580


How are strings stored in c?

599






What is the size of enum in c?

625


What is spaghetti programming?

674


What is #line in c?

565


What is the difference between int main and void main?

579


Where in memory are my variables stored?

639


Difference between MAC vs. IP Addressing

644


What are the primitive data types in c?

580


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

646


What is union in c?

642


Is it possible to execute code even after the program exits the main() function?

827