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
Why can arithmetic operations not be performed on void pointers?
What is the use of bit field?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain what is meant by 'bit masking'?
What is the value of c?
What is the use of getchar() function?
Why static is used in c?
What are the types of arrays in c?
Are pointers really faster than arrays?
Add Two Numbers Without Using the Addition Operator
How can you convert integers to binary or hexadecimal?
How can I read and write comma-delimited text?
What is the use of header?
What is a pointer in c?
What are the 5 elements of structure?