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

Answer Posted / karthikeyan.cse ist year.skce

main()
{
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 ?    11 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1715


What does double pointer mean in c?

584


What are the string functions? List some string functions available in c.

605


Differentiate between the expression “++a” and “a++”?

705


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

649






What are the benefits of organizational structure?

574


develop algorithms to add polynomials (i) in one variable

1743


Write a program to implement queue.

666


What is sorting in c plus plus?

565


What is wrong with this program statement?

610


What is the use of clrscr?

597


Differentiate between full, complete & perfect binary trees.

673


How can you call a function, given its name as a string?

714


In a switch statement, what will happen if a break statement is omitted?

603


What is the difference between exit() and _exit() function?

606