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
What are examples of structures?
Explain how do you override a defined macro?
Is malloc memset faster than calloc?
What is variable declaration and definition in c?
How can I change their mode to binary?
Explain the Difference between the New and Malloc keyword.
How can I ensure that integer arithmetic doesnt overflow?
Is there any demerits of using pointer?
What are runtime error?
How main function is called in c?
What is sizeof int in c?
Combinations of fibanocci prime series
Explain what are global variables and explain how do you declare them?
What is a node in c?
What are the parts of c program?