Computer Science, asked by xblind, 1 year ago

write a c program for a output
ABCDEFGFEDCBA
ABCDEF   FEDCBA
ABCDE       EDCBA
ABCD           DCBA
ABC                CBA
AB                    BA
A                        A

Answers

Answered by Jose
0
#include<stdio.h>
#include<conio.h>
main()

int i,j,k,s;

for(i=71;i>=65;i--) 
{
for(j=65;j<=i;j++)
{
printf("%c",j); 

}
for(s=1;s<((72-j)*2);s++) 
printf(" ");

for(k=i;k>=65;k--) 
{
if(k==71)
continue;
printf("%c",k);
}
printf("\n");
}


getch();
return 0;
}
 
Answered by sudhar
0
I think this would work.Forgive me if I am wrong.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\nABCDEFGFEDCBA");
printf("\n
ABCDEF   FEDCBA");
printf("\n
ABCDE       EDCBA");
printf("\n
ABCD           DCBA");
printf("\n
ABC                CBA");
printf("\n
AB                    BA");
printf("\n
A                        A");
getch();
}

Similar questions