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
Write a program to swap two numbers without using third variable in c?
What is the use of a ‘ ’ character?
What is the difference between a string and an array?
Is c is a middle level language?
What are the advantages and disadvantages of pointers?
What is pointers in c with example?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Explain data types & how many data types supported by c?
Can we declare a function inside a function in c?
Why C language is a procedural language?
How can you tell whether a program was compiled using c versus c++?
What is the scope of an external variable in c?
What is the explanation for cyclic nature of data types in c?
What are c identifiers?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?