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:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.

Answer Posted / naman patidar

void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=0; j<=i; j++){
printf(" *");
}
}
}

Is This Answer Correct ?    23 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between main and void main?

1140


What is printf () in c?

1028


Is array name a pointer?

1007


What is return type in c?

1086


What are the parts of c program?

1059


What is file in c preprocessor?

1101


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1070


In C language, a variable name cannot contain?

1240


What is the use of sizeof () in c?

1005


How can I make sure that my program is the only one accessing a file?

1215


Do array subscripts always start with zero?

1253


How do c compilers work?

1071


What is dynamic dispatch in c++?

1022


Why do we use c for the speed of light?

1125


When should you not use a type cast?

1081