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

Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5

Answer Posted / deepti

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1233


What is a scope resolution operator in c?

1247


What is the method to save data in stack data structure type?

1069


When should the volatile modifier be used?

1151


What is volatile, register definition in C

1087


Explain what are the __date__ and __time__ preprocessor commands?

1104


Can include files be nested? How many levels deep can include files be nested?

1140


What is a macro?

1087


What are near, far and huge pointers?

1042


What are the 5 data types?

1109


How many types of operators are there in c?

1020


What is the purpose of main() function?

1231


Explain what is the difference between functions abs() and fabs()?

1163


What is the use of parallelize in spark?

1013


Why c is called top down?

1142