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");
if(i == 0)
printf("*\t");
else
for(k = 0; k < i*2+1; k++)
printf("*\t");
printf("\n");
}
return 0;
}

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are advantages of using friend classes?

1010


How to declaring variables in c++?

1104


How a new element can be added or pushed in a stack?

960


Explain the use of vtable.

1025


Can we overload operator in c++?

975


Should a constructor be public or private?

976


What is private public protected in c++?

979


What is a constant reference?

1014


What is :: operator in c++?

984


What is the best free c++ compiler for windows?

1042


What is the role of C++ shorthand's?

1221


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1091


What are compilers in c++?

1021


Is c++ faster than c?

975


How can virtual functions in c++ be implemented?

1056