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 / srinivas 9491582281

#include<stdio.h>
#include<conio.h>
main()
{
int i,j;
clrscr();
for(i=1;i<=10;i++)
{
if(i%2!=0)
printf("*\n");
else
{
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
}
getch();
}

Is This Answer Correct ?    15 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code on reverse string and its complexity.

997


What are the types of pointers in c?

988


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1877


Write a program to use switch statement.

1092


How can I access an I o board directly?

1050


What do you mean by recursion in c?

1067


What are the types of macro formats?

1071


What is c language used for?

943


What does != Mean in c?

1001


What is volatile variable in c with example?

1010


Why isn't any of this standardized in c? Any real program has to do some of these things.

1175


What is pre-emptive data structure and explain it with example?

3677


Should I learn c before c++?

1191


How can I implement a delay, or time a users response, with sub-second resolution?

1049


write a c program to find the sum of five entered numbers using an array named number

2090