CPP   93
stars function
Guest on 20th April 2022 02:09:47 AM


  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void bars(int amount) {
  5.  
  6.     for(int i=1;i<=amount;i++)
  7.         cout << char(219);
  8.  
  9. }
  10. int main() {
  11.     for(int i=1;i<=20;i++) {
  12.         bars(i);
  13.         cout << endl;
  14.     }
  15.     return 0;
  16. }

Raw Paste

Login or Register to edit or fork this paste. It's free.