write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / guriya kumari
#include<stdio.h>
void main()
{
int i,j,k,l,m;
for(i=0;i<=6;i++)
{
for(k=65;k<=71-i;k++)
printf("%c",k);
for(j=1;j<=i*2-1;j++)
printf(" ");
for(l=71-i;l>=65;l--){
if(l==71)
continue;
printf("%c",l);}
printf("\n");
}
}
| Is This Answer Correct ? | 26 Yes | 8 No |
Post New Answer View All Answers
Explain what is the benefit of using const for declaring constants?
In a header file whether functions are declared or defined?
How to write c functions that modify head pointer of a linked list?
What does it mean when the linker says that _end is undefined?
What are loops c?
Write a program to check palindrome number in c programming?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Explain the priority queues?
Implement bit Array in C.
which type of aspect you want from the student.
Explain the use of function toupper() with and example code?
What is the use of bit field?
Why do we use main function?
Explain the use of 'auto' keyword
What are high level languages like C and FORTRAN also known as?