Advertisement
Abelsor

S4_Ejercicio_6

Mar 1st, 2023
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. // Triangulo Isosceles
  2.  
  3. #include<iostream>
  4.  
  5. using namespace std;
  6.  
  7. void t_isosceles(int);
  8.  
  9. int main()
  10. {   int n;
  11.     cin>>n;
  12.    
  13.     t_isosceles(n);
  14.    
  15.    
  16. }
  17.  
  18. #include<iostream>
  19. using namespace std;
  20.  
  21. void t_isosceles(int n){
  22.     for(int i=1 ; i<=n ; i++){
  23.         for(int j=n-i ; j>0 ; j--){
  24.             cout<<"-";
  25.         }
  26.         for(int j=0 ; j<2*i-1 ; j++){
  27.             cout<<"*";
  28.         }
  29.        
  30.         cout<<endl;
  31.     }
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement