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...

how can i get this by using for loop?
*
**
*
****
*
******

Answer Posted / vignesh1988i

sorry folks, a small mistake in above program , the below is the correct one's...........


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


thank u

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can static variables be declared in a header file?

1098


What is default value of global variable in c?

1046


Differentiate between full, complete & perfect binary trees.

1165


what is the basis for selection of arrays or pointers as data structure in a program

4339


how can I convert a string to a number?

1134


List the different types of c tokens?

1120


Can a pointer be null?

1077


What is context in c?

975


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1202


what value is returned to operating system after program execution?

2176


what do you mean by enumeration constant?

1060


What is the function of this pointer?

1450


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1306


What is "Duff's Device"?

1217


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2056