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?

1178


How can a string be converted to a number?

1031


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1116


What is calloc malloc realloc in c?

1070


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2591


Difference between malloc() and calloc() function?

1216


Where static variables are stored in memory in c?

1016


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1219


What are the different types of linkage exist in c?

1043


How are pointers declared in c?

1074


i have a written test for microland please give me test pattern

2745


What is main function in c?

1094


What does it mean when a pointer is used in an if statement?

1121


How can I direct output to the printer?

1333


What is conio h in c?

1054