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

how will u send the idoc

2751


i made lan connections ,then how can i establish the network....with that connections only is the network is established ...tell me the procedure for giving the lan connection for some(10) pc's?

1766


who is the judge in case of the auditor has raised an NCR against an auditee? who should decide weather this NCR is acceptable and the auditee has to accept?

1864


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

2043


How do trains go around bends?

1151


can i knw what are we supposed to read for the coming oces/dgfs 2009 exam?what kind of book are we supposed to study?

2096


How can we share data between actions in qtp..pls tell me

2253


Why does the 'divisibility by 3' rule work?

3142


There are n points and each point enclose with x and y axis form a rectangle and find the point using a program which forms the smallest rectangle?

2038


Tell me all about production of drought and its losses In the boiler?

1775


Reverse the link list without creating new list ?

2677


how am i supposed to convert a class program in C++ to Matlab? Do i also need to make classes in matlab too or I can do it without making classes???Can somebody help....

1951


sir i have 4 year gap in engineering. i would complete my degree b.tech it in 2014. it will be may be in 2nd class.my hsc is also with 2nd class. i am week in programming. Then if i want highest package upto 5-6 lacs then what should i prepare myself as a good engineer to get this package???

1880


how to initialize a pointer to an array?

2448


I am going to HAL Online test for Computer Science. Can you please mail me the model question papers ?

2935