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 encapsulation in C++? Give an example.

1042


What new()is different from malloc()?

1061


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

6356


Tell me can a pure virtual function have an implementation?

983


What does return 0 do in c++?

992


Is c++ an integer?

986


What is overloading unary operator?

1037


Is linux written in c or c++?

1001


Can we use this pointer inside static member function?

1035


What are advantages of using friend classes?

1019


Is c# written in c++?

938


What is conditions when using boolean operators?

1158


Which bitwise operator is used to check whether a particular bit is on or off?

1028


What are the types of container classes?

1103


What is an adaptor class in c++?

1111