fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. char f[] = "011235" "8" "532110";
  5. char * pf1 = f+6;
  6. char * pf2 = pf1;
  7.  
  8. for(int i=6; i>-1;--i){
  9. std::cout << std::string(i, '-') << std::string(pf1--, ++pf2) << '\n';
  10. }
  11.  
  12. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
------8
-----585
----35853
---2358532
--123585321
-11235853211
0112358532110