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 / vivek kumar

#include <stdio.h>
#define MAX 6
int main()
{
int i, j,k;

for(i = 0; i < MAX; i++)
{
for(j = 0; j < MAX-1-i; j++)
printf("\t");
for(k = 0; k < i*2+1; k++)
printf("*\t");
printf("\n");
}
return 0;
}

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an accessor in c++?

1117


Does c++ support multilevel and multiple inheritances?

1059


Give example of a pure virtual function in c++?

1242


Show the application of a dynamic array with the help of an example.

1194


What is buffer and example?

1089


What are virtual constructors/destructors?

1076


What are the defining traits of an object-oriented language?

1261


Write a program to concatenate two strings.

1149


What is the copy-and-swap idiom?

1168


What is the difference between an external iterator and an internal iterator?

1144


What is the extraction operator and what does it do?

1124


What is atoi?

1024


Write a C++ Program to check whether a number is prime number or not?

1172


What is the default width for ouputting a long integer using the insertion operator?

1299


What are the benefits of operator overloading?

1271