write a c program for a output
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answers
Answered by
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;
}
#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
0
I think this would work.Forgive me if I am wrong.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\nABCDEFGFEDCBA");
printf("\nABCDEF FEDCBA");
printf("\nABCDE EDCBA");
printf("\nABCD DCBA");
printf("\nABC CBA");
printf("\nAB BA");
printf("\nA A");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\nABCDEFGFEDCBA");
printf("\nABCDEF FEDCBA");
printf("\nABCDE EDCBA");
printf("\nABCD DCBA");
printf("\nABC CBA");
printf("\nAB BA");
printf("\nA A");
getch();
}
Similar questions