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

What does c in a circle mean?

1091


Why does this code crash?

1109


What is the difference between variable declaration and variable definition in c?

1068


Are there namespaces in c?

1146


What is the difference between printf and scanf in c?

1371


What oops means?

1012


What does typedef struct mean?

1125


What is spaghetti programming?

1151


What is difference between structure and union in c programming?

1124


What are derived data types in c?

1100


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1226


write a program to display all prime numbers

1984


Is array name a pointer?

1040


What is meant by int main ()?

1219


What is atoi and atof in c?

1093