fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n = 6;
  7.  
  8. for(int x=0; x <= n; x++) {
  9.  
  10. for(int y=0; y <= x; y++) {
  11. cout <<"*";
  12. }
  13. cout <<endl;
  14. }
  15. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
*
**
***
****
*****
******
*******