A B C D E F G F E D C B A
A B C D E F F E D C B A
A B C D E E D C B A
A B C D D C B A
A B C C B A
A B B A
A A

Answer Posted / varun arora

#include <stdio.h>

int main(void)
{
int i, j, k;
char ch;

i = 0;
while(i <= 5)
{
j = 5;
ch = 'A';
printf("\n");
while(j >= i)
{
printf("%c", ch);
j--;
ch++;
}
j = 1;
while(j <= (2 * i - 1))
{
printf(" ");
j++;
}
if(i == 0) ch -= 2;
else ch--;
while(ch >= 'A')
{
printf("%c", ch);
ch--;
}
i++;
}

return 0;
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

695


When a c file is executed there are many files that are automatically opened what are they files?

584


Do pointers need to be initialized?

556


Why do we use header files in c?

569


How can this be legal c?

645






Is linux written in c?

594


The __________ attribute is used to announce variables based on definitions of columns in a table?

662


What are pointers? What are stacks and queues?

571


Is that possible to add pointers to each other?

888


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

637


Why void main is used in c?

559


can anyone please tell about the nested interrupts?

1670


What is switch in c?

637


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1591


How are 16- and 32-bit numbers stored?

717