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 print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements.

Answer Posted / reshma m.

int i,j,m;
m=2;
for(i=0;i<5;i++)
{putch('*');
putch('\n');
for(j=0;j<m;j++)
{putch('*');
m+=2;
}
putch('\n');
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pointers in c?

1081


What is the difference between procedural and functional programming?

1038


How do you do dynamic memory allocation in C applications?

1065


Explain a pre-processor and its advantages.

1098


What is extern variable in c with example?

975


What is a null pointer in c?

1166


How can I remove the trailing spaces from a string?

1046


Which is the best website to learn c programming?

1054


What is static memory allocation?

1127


what is the function of pragma directive in c?

1084


Explain what are the standard predefined macros?

1090


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2713


What is 02d in c?

1048


What is .obj file in c?

1044


What is #pragma statements?

1068