Skip to content

Instantly share code, notes, and snippets.

@fernandoalv
Created April 17, 2015 20:43
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 fernandoalv/63757b4a9999d1fa1623 to your computer and use it in GitHub Desktop.
Save fernandoalv/63757b4a9999d1fa1623 to your computer and use it in GitHub Desktop.
Fernando Alvarado
#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