Skip to content

Instantly share code, notes, and snippets.

@Adals20
Created March 23, 2017 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Adals20/8c590c6d25a8534e3c7f717e87890fd6 to your computer and use it in GitHub Desktop.
Save Adals20/8c590c6d25a8534e3c7f717e87890fd6 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
void linea(int n){
int i = 0, f =0;
if (i<=n){
for (i =0; i<= n; i++)
cout << "T";
}
cout <<"\n";
}
void piramide(int n){
int f=0;
while (f<=n){
linea (f);
f = f+1;
}
while (f>=0){
linea (f);
f = f-1;
}
}
main(){
int n;
cout << "Tamaño de su piramide: " ;
cin >> n;
piramide (n);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment