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

#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)
{
for(int j=-2;j<=i;j+=2)
printf("*");
printf("*\n*");
}
getch();
}


thank u

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why do some people write if(0 == x) instead of if(x == 0)?

1083


Write a program for Overriding.

1165


Is null a keyword in c?

1200


When a c file is executed there are many files that are automatically opened what are they files?

1112


How many keywords (reserve words) are in c?

1146


Do pointers take up memory?

1165


Explain the meaning of keyword 'extern' in a function declaration.

1155


Explain how do you list a file’s date and time?

1043


How to implement a packet in C

2890


Why use int main instead of void main?

1125


What is the difference between array and structure in c?

1179


Do string constants represent numerical values?

1409


Explain what is the difference between functions abs() and fabs()?

1190


Why we use void main in c?

1177


Explain how do you declare an array that will hold more than 64kb of data?

1459