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 to print this pyramid *
*
*
* * * * * * *
*
*
*

Answer Posted / j.n.abhishek

void main()
{
int n,i,j;
clrscr();
printf("ENTER THE LIMIT:");
scanf("%d",&n);
for(i=0;i<=(2*n);i++)
{
if(i!=n)
{
for(j=0;j<(2*n);j++)
{
printf(" ");
}
printf("+\n");
}
else
{
for(j=0;j<=(2*n);j++)
{
printf("+ ");
}
printf("\n");
}
}
getch();
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

simple program of graphics and their output display

1981


What does sizeof function do?

1180


Why is c called a structured programming language?

1265


What are global variables and explain how do you declare them?

1086


What is difference between scanf and gets?

1253


Why c is procedure oriented?

1056


Explain the concept and use of type void.

1103


How variables are declared in c?

1026


How can you tell whether two strings are the same?

1244


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1989


What are the features of the c language?

1069


Add Two Numbers Without Using the Addition Operator

806


What is context in c?

914


What does *p++ do?

1012


Where is volatile variable stored?

1071