write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / balaji ganesh
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 ? | 73 Yes | 45 No |
Post New Answer View All Answers
Explain union.
What does. int *x[](); means ?
Which is an example of a structural homology?
What are the benefits of organizational structure?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
Disadvantages of C language.
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
There seem to be a few missing operators ..
Do you know the use of fflush() function?
Write a code on reverse string and its complexity.
What is d'n in c?
How can I list all of the predefined identifiers?
What is register variable in c language?
Who invented b language?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.