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 / dhanashree n.gavade

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

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between far and near in c?

1065


What is type qualifiers?

1127


What are the parts of c program?

1101


What is mean by data types in c?

1021


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1112


What is wrong with this program statement?

1028


What is extern c used for?

1052


What is the main difference between calloc () and malloc ()?

1143


What is a nested loop?

1114


What is d'n in c?

1117


What are pointers? Why are they used?

1174


What is the difference between text files and binary files?

1343


What is structure of c program?

1155


Write a program to reverse a linked list in c.

1115


Which is better oop or procedural?

1053