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 is the use of typedef?

1105


What is the full form of stl in c++?

1201


Is map sorted c++?

1016


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

1064


Why do we use the using declaration?

1184


What is enum class in c++?

1266


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2645


What is the use of lambda in c++?

1048


Search for: what is pair in c++?

1129


What is the difference between #define debug 0 and #undef debug?

1197


How many different levels of pointers are there?

1226


What is a binary file? List the merits and demerits of the binary file usagein C++.

1312


What is overloading unary operator?

1100


Briefly describe a B+ tree. What is bulk loading in it?

1353


What is the standard template library (stl)?

1803