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
What is the mistake in the following program segment ? f() { int a; void c; f2(&c,&a);}
Write the fetch cycle and execute cycle for following instructions:JMPNZ (jump to the given address if the accumulator not equal to zero) RET(return from a subroutine) ADB (add the contents of register B to the accumulator and save result in the accumulator).
4. What is your typical way of dealing with conflict?
what are nanoemulsions and how are they prepared? i want a brief outline about nanoemulsions.. is anyone of you is having any literature, can you share that? also any an idea where i can get the information?
What is candidate key ? What is Alter net key ? & What is foreign key ?
what's the difference between windows serevr 2003 or windows XP.
what are the various technique used for inter process communication?
what is the effect of low frequency(say 48Hz) on TUrbo- Generator set when running for a prolonged period?
I am refused L1-B visa filed by my employer on May 09 by US consulate Chennai. When i am eligible to apply L1-B visa again through my employer?
Define function ? Explain arguments in functions ?
hi friends i am first time using this site.i came to by some tcs personals that certifications r important for placements.i am financially average i am learning java from books.please tell is it enough if not which certification should i go for
what is the pri request of binary search
what is buffer solution?
hi, please send me "state bank of india", last 5 years question paper with answers to my mail id.
what is difference between semaphre and deadlock