Created
April 17, 2015 20:43
-
-
Save fernandoalv/63757b4a9999d1fa1623 to your computer and use it in GitHub Desktop.
Fernando Alvarado
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void tri(int x){ | |
for(int i=1;i<=x;i++){ | |
for(int t=1;t<=i;t++) | |
{ | |
cout<<"T"; | |
} | |
cout<<endl; | |
} | |
for(int i=(x-1);i>0;i--){ | |
for(int t=1;t<=i;t++){ | |
cout<<"T"; | |
} | |
cout<<endl; | |
} | |
} | |
int main(){ | |
int x; | |
cout<<"Dame la medida de tu triangulo"<<endl; | |
cin>>x; | |
tri(x); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment