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