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

Write a program to check armstrong number in c?

1082


What will be the outcome of the following conditional statement if the value of variable s is 10?

1230


What is data type long in c?

1025


What does the function toupper() do?

1064


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1034


How can I discover how many arguments a function was actually called with?

1018


Is void a keyword in c?

923


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1098


What are the advantages of using macro in c language?

1066


How can you determine the maximum value that a numeric variable can hold?

1150


What are the usage of pointer in c?

1122


What are the rules for identifiers in c?

1028


Write a program to find factorial of a number using recursive function.

1064


What is mean by data types in c?

966


Why is c faster?

1014