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
List out few of the applications that make use of Multilinked Structures?
What are the 5 types of organizational structures?
What is a header file?
Are the variables argc and argv are always local to main?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Can we initialize extern variable in c?
pierrot's divisor program using c or c++ code
How do I round numbers?
How can a process change an environment variable in its caller?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What is atoi and atof in c?
What are data structures in c and how to use them?
What are identifiers c?
How does #define work?
How can I pad a string to a known length?