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 in c to print
1
121
12321
1234321
123454321

Answer Posted / durai

int a, b;
for( a=1;i<=5;a++)
{
for(b=1;b<=(2*a-1);b++)
{ if(b<=a)
printf b;
else
printf(2*a-b);
}
printf
;
}

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are integer variable, floating-point variable and character variable?

1299


Difference between pass by reference and pass by value?

1214


What is wrong with this code?

1246


Write a program of prime number using recursion.

1131


How does free() know explain how much memory to release?

1111


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1211


What does int main () mean?

1078


Define VARIABLE?

1239


What is pass by reference in c?

1243


Explain how can I remove the trailing spaces from a string?

1108


What are c preprocessors?

1248


what is the difference between 123 and 0123 in c?

1278


How can I trap or ignore keyboard interrupts like control-c?

1118


Explain the advantages and disadvantages of macros.

1145


What are the difference between a free-standing and a hosted environment?

1346