fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s(6, '*');
  7. while (s.size() > 1) {
  8. cout << s << endl;
  9. s.pop_back();
  10. }
  11. }
  12.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
******
*****
****
***
**