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...

how do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1

Answer Posted / cinu

#include<stdio.h>
int main()
{
int i,j,n;
printf("Enter no");
scanf("%d",&n);
for(i=0;i<=n;i++)
{

for(j=1;j<=n-i;j++)
printf("%d",j);
for(j=0;j<2*i;j++)
printf(" ");
for(j=n-i;j>0;j--)
printf("%d",j);

printf("\n");
}
}

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the zener breakdown?

1011


What types of inverters require feedback diodes?

1475


How the active power factor correction changes the wave shape of current drawn by a load to improve the power factor?

1034


What does the pinch off voltage refers to in a mosfet?

1051


Why silicon and germanium are the two widely used semiconductor materials?

1045


For 65hp motors how kvr capacitor should be on??

1456


What is meant by bidirectional or half-wave ac voltage controller?

1074


State and explain some of p-n junction diode applications.

1090


Define hybrid parameter?

1170


Tell me in a mosfet, what does the pinch off voltage refers to?

1038


What is snubber circuit?

1050


define drain resistance

1040


What are the advantages of bjt?

1020


Write down the characteristics of digital ics?

1109


what is voltage drop?

1026