write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / karthikeyan.cse ist year.skce
main()
{
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 ? | 11 Yes | 9 No |
Post New Answer View All Answers
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
What does double pointer mean in c?
What are the string functions? List some string functions available in c.
Differentiate between the expression “++a” and “a++”?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
What are the benefits of organizational structure?
develop algorithms to add polynomials (i) in one variable
Write a program to implement queue.
What is sorting in c plus plus?
What is wrong with this program statement?
What is the use of clrscr?
Differentiate between full, complete & perfect binary trees.
How can you call a function, given its name as a string?
In a switch statement, what will happen if a break statement is omitted?
What is the difference between exit() and _exit() function?