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

Why can’t we compare structures?

1253


What is the difference between local variable and global variable in c?

1212


If you know then define #pragma?

1092


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1239


What are structural members?

996


How can you find out how much memory is available?

1055


Explain void pointer?

1029


Write a program to identify if a given binary tree is balanced or not.

1136


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4252


What is openmp in c?

1010


What is equivalent to ++i+++j?

1077


What is a global variable in c?

989


Explain how are portions of a program disabled in demo versions?

1105


What is the advantage of an array over individual variables?

1218


How can I do serial ("comm") port I/O?

1168