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
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is nested structure?
What are the restrictions of a modulus operator?
What is a program?
The file stdio.h, what does it contain?
What is the difference between formatted&unformatted i/o functions?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
Difference between linking and loading?
Which header file is used for clrscr?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Can you please explain the difference between strcpy() and memcpy() function?
What is chain pointer in c?
What is the difference between arrays and pointers?
What are global variables?
Write a program which returns the first non repetitive character in the string?