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

program to print this triangle
*
* *
* * *

Answer Posted / amit

/* Display Following Output
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
* * * * * * * * * * * */

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,r;
clrscr();

printf("\n\t Enter the raw number for Making Pyramind =>");
scanf("%d",&r);

printf("\n\n\n\n");

for(i=0;i<r;i++)
{
for(k=r;k>=i;k--)
{
printf(" ");
}
for(j=0;j<=i;j++)
{
printf(" *",i,j);
}
printf("\n");

}
getch();
}

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstraction in c++ with example?

1031


What do you mean by late binding?

1058


Can c++ do everything c can?

1006


Explain the difference between using macro and inline functions?

1057


Is std :: string immutable?

992


What is the history of c++?

998


How would you use qsort() function to sort an array of structures?

1067


What does int * mean in c++?

1167


Is there any difference between int [] a and int a [] in c++?

947


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

909


Define stacks. Provide an example where they are useful.

952


What is a memory leak c++?

1063


How does c++ sort work?

926


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1966


What is difference between c++ and c ++ 14?

987