Created
May 3, 2016 16:49
-
-
Save alonzoibarra97/45892833919dc808c489b760c25ab312 to your computer and use it in GitHub Desktop.
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; | |
int triangles(int size){ | |
for(int i=1; i<=size; i++) | |
{ | |
for(int n=1; n<i+1;n++) | |
cout<<"T"; | |
cout<<endl; | |
} | |
for(int i=size-1; i>=1; i--){ | |
for(int n=1; n<i+1;n++) | |
cout<<"T"; | |
cout<<endl; | |
} | |
} | |
int main(){ | |
int tamao; | |
cout<< "Give the size you want for the triangle"; | |
cin>> tamao; | |
triangles(tamao); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment