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 do we use return in c?

949


I have seen function declarations that look like this

989


Why does the call char scanf work?

1150


What is static memory allocation?

1094


Why do we need volatile in c?

1116


What is maximum size of array in c?

988


Why double pointer is used in c?

987


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2714


If the size of int data type is two bytes, what is the range of signed int data type?

974


Why do we use main function?

1103


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1665


Explain the difference between strcpy() and memcpy() function?

947


What are the __date__ and __time__ preprocessor commands?

1033


Can we compile a program without main() function?

1073


Write a code on reverse string and its complexity.

979