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

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

how to print this using while statement??

Answer Posted / divyesh

int i=1,j,k;
while(i<6)
{
k=((10-(2*i)))/2;
while(k>0)
{
printf(" ");
k--;
}
j=1;
while(j<=i)
{
printf("%d ",j);
j++;
}
printf("\n");
i++;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a function that responds to a click anywhere on the page by displaying an alert dialog. Display the event name if the user held Shift during the mouse click. Display the element name that triggered the event if the user held Ctrl during the mouse click.

2065


how can i implement a program of polynomial adding,multiplication,through c language???

1901


i opt cse branch in engineering.which subject i have choose in civil service preliminary examination

1985


dam,rivers,states capt,

2251


which topics are come from quizs

1610


boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName);

2117


I have done BE ( computer science) i secleted in sbi clerical written exam. so what questions they asked according to my subject please send me the answer

1977


What is ball bearing concept & its design.

1827


I am looking for NIC Scientific Officer / Engineer-SB (Programmer)Sample papers or any portion of questions/ syllabus plz, send me on sengupta.pranab@gmail.com. Regards PRANAB

2374


as a student of b.tech 2nd yr which is the best place for me to do my summer training and plz also tell me the complete procedure for the entrance?

1939


Client server applications

1905


who is your role modal give in few sentances

2155


what is the effect of low frequency(say 48Hz) on TUrbo- Generator set when running for a prolonged period?

2476


Has anyone attended interviews in IITs for positions like Research fellowships/assistants? If yes, please share the experience about how complex the interview was, etc. etc.

1947


What would you like to discuss? Your work-ex or Your Engineering?

1030