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 / sreesen@ymail.com

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

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of bit field?

1235


Can we declare variable anywhere in c?

919


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1211


Do you have any idea how to compare array with pointer in c?

987


Explain Basic concepts of C language?

1077


main() { printf("hello"); fork(); }

1145


Is multithreading possible in c?

949


Why is c platform dependent?

1019


What is atoi and atof in c?

1027


What is operator precedence?

1149


What are inbuilt functions in c?

980


Which function in C can be used to append a string to another string?

1176


What extern c means?

930


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

2063


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1967