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

What do you mean by recursion in c?

1070


How can you return multiple values from a function?

1075


List a few unconditional control statement in c.

949


Can a local variable be volatile in c?

968


praagnovation

2238


What is the purpose of scanf() and printf() functions?

1201


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2388


Explain what are binary trees?

1042


Why does the call char scanf work?

1177


In a switch statement, explain what will happen if a break statement is omitted?

1016


How arrays can be passed to a user defined function

985


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1094


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2546


When do we get logical errors?

1092


what is bit rate & baud rate? plz give wave forms

1926