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
Should I learn data structures in c or python?
What is static and volatile in c?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Do character constants represent numerical values?
What are the differences between new and malloc in C?
Why do we need functions in c?
Can a variable be both const and volatile?
What is a program flowchart?
Explain About fork()?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
How can I open a file so that other programs can update it at the same time?
What does it mean when the linker says that _end is undefined?
What is the use of void pointer and null pointer in c language?
I need testPalindrome and removeSpace
#include