fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int N = 10;
  6.  
  7. for (int i = 1; i <= N; i++) {
  8.  
  9. for (int j = 1; j <= N; j++) {
  10. if (j <= i) {
  11. cout << "*";
  12. } else {
  13. cout << ".";
  14. }
  15. }
  16.  
  17. cout << endl;
  18. }
  19. }
Success #stdin #stdout 0s 5320KB
stdin
7
stdout
*.........
**........
***.......
****......
*****.....
******....
*******...
********..
*********.
**********