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

Is vector a class in c++?

1040


What is nested class in c++?

956


Does improper inheritance have a potential to wreck a project?

1139


Tell me what are static member functions?

1078


What are c++ manipulators?

1073


What is the identity function in c++? How is it useful?

1050


What are the uses of static class data?

1184


What is function declaration in c++ with example?

1098


What is the cout in c++?

1052


What is difference between n and endl in c++?

1093


What is the c++ programming language used for?

1043


What is an operator in c++?

1062


Why we use #include conio h in c++?

1044


Explain how the virtual base class is different from the conventional base classes of the opps.

1165


Write a program to concatenate two strings.

1093