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

What is the purpose of clrscr () printf () and getch ()?

591


What is f'n in math?

612


What is abstract data structure in c?

520


what is stack , heap ,code segment,and data segment

2210


How is a pointer variable declared?

588






What are inbuilt functions in c?

555


What is the best way to comment out a section of code that contains comments?

773


In C language, a variable name cannot contain?

736


What does typeof return in c?

633


What is a macro?

653


Is that possible to store 32768 in an int data type variable?

685


What is sizeof int?

629


explain what are pointers?

614


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1488


Explain what are preprocessor directives?

621