Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A

Answer Posted / karthikeyan ist year cse skc

in()
{
int i,n=65,m=72,f=0,s=-6;
clrscr();
while(m-->=n)
{s+=4;
for(i=n;i<m;i++)
printf("%c ",i);
if(f==0) ++m;
else
for(i=0;i<s;i++) printf(" ");
for(i=m-1;i>=n;i--)
printf("%c ",i);
printf("\n");f=1;
}
getch();
}

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why doesnt this code work?

214


What is structure padding in c?

184


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

1757


What library is sizeof in c?

182


When was c language developed?

239






Why is void main used?

188


Is boolean a datatype in c?

159


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

184


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

1653


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

232


What are the advantages of using Unions?

235


What's a good way to check for "close enough" floating-point equality?

212


What is c language in simple words?

187


What are the types of type qualifiers in c?

252


How can I find out how much free space is available on disk?

195