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...

code snippet for creating a pyramids triangle
ex

1
2 2
3 3 3

Answer Posted / k

#include<iostream.h>
int main()
{int i,j,k;
for(i=1;i<=3;i++)
{cout<<"\n";
for(j=1;j<=3-i;j++)
cout<<" ";
for(k=i;k>0;k--)
cout<<i<<" ";
}
return 0;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %2f mean in c?

1287


What is a built-in function in C?

1672


Write a program to check prime number in c programming?

1150


What is openmp in c?

1070


Differentiate Source Codes from Object Codes

1665


Is c++ based on c?

1135


Differentiate between the = symbol and == symbol?

1369


Define macros.

1331


Can you return null in c?

1235


What is file in c preprocessor?

1199


Explain how can I right-justify a string?

1099


Which is the best website to learn c programming?

1137


how to write optimum code to divide a 50 digit number with a 25 digit number??

3301


The difference between printf and fprintf is ?

1346


Is main is a keyword in c?

1178