fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. //your code goes here
  6. for(int i =0;i<5;i++){
  7. for(int j =0;j<5;j++){
  8. if(j>=5-i-1){
  9. cout<<"*";
  10. }
  11. else {
  12. cout<<" ";
  13. }
  14.  
  15. }
  16. cout<<endl;
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5296KB
stdin
Standard input is empty
stdout
    *
   **
  ***
 ****
*****