code.cpp 219 B

1234567891011
  1. /* Create a function that takes a number (from 1 - 60)
  2. * and returns a corresponding string of hyphens.
  3. */
  4. std::string Go(int num) {
  5. std::string n = "";
  6. for (int a=0;a<num; a++){
  7. n = n + '-';
  8. }
  9. return n ;
  10. }