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...

Write a program to produce the following output:
1
2 3
4 5 6
7 8 9 10

Answer Posted / ashok kumar

void main()
{
int n,i,j,k=1;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=i;j<n;j++)
printf(" ");
for(j=1;j<=i;j++)
printf(" %d ",k++);
printf("\n");
}
getch();
}

Is This Answer Correct ?    31 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why pointers are used?

1116


Is c high or low level?

1053


What is formal argument?

1189


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1578


What is pointer to pointer in c language?

1211


What do you mean by scope of a variable in c?

1055


Do you know the use of 'auto' keyword?

1262


Explain argument and its types.

1114


can anyone please tell about the nested interrupts?

2183


What are the __date__ and __time__ preprocessor commands?

1174


List the different types of c tokens?

1120


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1137


How to write c functions that modify head pointer of a linked list?

1031


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1767


How many loops are there in c?

1163