Pretoript

triangledraw

Jan 30th, 2021 (edited)
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     for(int i=1; i<=10; ++i)
  6.     {
  7.         for(int j=1; j<=i-1; ++j)
  8.         {
  9.             std::cout<<" ";
  10.         }
  11.  
  12.         for(int j=1; j<=10-i+1; ++j)
  13.         {
  14.             std::cout<<"*";
  15.         }
  16.  
  17.         std::cout << std::endl;
  18.     }
  19. }
Add Comment
Please, Sign In to add comment