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 / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
printf("enter the lines :");
scanf("%d",&n);
for(int i=1;i<=n/2;i++)
{
printf("*\n");
for(int j=1;j<=2*i;j++)
printf("%d",j);
printf("\n");
}
if(n%2!=0)
printf("\n*");
getch();
}

thank u

Is This Answer Correct ?    54 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you mean by enumeration constant?

996


Tell me what are bitwise shift operators?

1121


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1046


What is void main () in c?

1185


What is the right type to use for boolean values in c? Is there a standard type?

998


What is meant by recursion?

1034


how to find binary of number?

4416


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

1191


Describe static function with its usage?

1190


How main function is called in c?

1112


write a program for the normal snake games find in most of the mobiles.

2244


Is c is a procedural language?

1073


How do I round numbers?

999


What are derived data types in c?

1061


The __________ attribute is used to announce variables based on definitions of columns in a table?

1183