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 are the data types present in c?

1110


What is a MAC Address?

1019


Can two or more operators such as and be combined in a single line of program code?

1326


simple program of graphics and their output display

1957


Explain spaghetti programming?

1204


How can I get back to the interactive keyboard if stdin is redirected?

1148


How many keywords are there in c?

1037


How can you increase the allowable number of simultaneously open files?

1101


Explain what is a 'locale'?

1026


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3470


What is meant by high-order and low-order bytes?

1009


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1017


What is a constant and types of constants in c?

1081


What is the use of typedef in structure in c?

933


What is register variable in c language?

998