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

Describe protected access specifiers?

1292


What are the differences between the function prototype and the function defi-nition?

1158


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

1112


How does work in c++?

1133


Difference between pass by value and pass by reference?

1216


Explain "const" reference arguments in function?

1111


What is a volatile variable in c++?

1570


What is a storage class?

1374


How does com provide language transparency?

1062


What is virtual function? Explain with an example

1146


Is java as fast as c++?

1153


Explain about templates of C++.

1202


What is the role of static keyword for a class member variable?

1114


What are the advantages of using typedef in a program?

1183


What is the difference between a pointer and a link in c ++?

1108