Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A

Answer Posted / deepak shrimali

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,p,q;
clrscr();
q=-1;
for(i=71;i>=65;i--,q++)
{
for(j=65;j<=i;j++)
{
printf("%c",j);
}
if(i!=71)
{
for(p=0;p<2*q+1;p++)
{
printf(" ");
}
}
if(i==71)
{
k=i-1;
}
else
{
k=i;
}
for(;k>=65;k--)
{
printf("%c",k);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the general form of a C program?

978


Tell me is null always defined as 0(zero)?

1034


What is the heap in c?

1030


What is sizeof in c?

955


what is the difference between 123 and 0123 in c?

1157


Why we not create function inside function.

2142


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

1204


Explain output of printf("Hello World"-'A'+'B'); ?

1431


What is clrscr ()?

1056


What is the full form of getch?

1182


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1527


Why flag is used in c?

1068


What is calloc()?

1026


What does emoji p mean?

1046


What are the keywords in c?

1078