Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how can i get the output
54321
4321
321
21
1

in c programming........???? pls help......

Answer Posted / aftab rai

#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n;
printf("enter numbers of lines");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{printf("%d",i+1+j);}
printf("\n");
}
getch();
}

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know the difference between exit() and _exit() function in c?

1111


What is an expression?

1108


Explain what are run-time errors?

1145


Write a program to use switch statement.

1184


What is a lookup table in c?

1175


How can I write a function analogous to scanf?

1233


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3439


What are actual arguments?

1158


How can I split up a string into whitespace-separated fields?

1107


List some of the static data structures in C?

1243


What does != Mean in c?

1094


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1322


How can you restore a redirected standard stream?

1174


What is the use of bit field?

1235


How can I list all of the predefined identifiers?

1032