Ad
Fundamentals
Strings
Code
Diff
  • using namespace std;
    string digest(string param) {
        string result;
        for (int i = 0; i < param.size() - 1; i++) {
          result += param[i];
          result += ' ';
        }
        result += param[param.size() - 1];
        return result;
    }
    • #include <string.h>
    • std::string digest(std::string param) {
    • std::string result;
    • using namespace std;
    • string digest(string param) {
    • string result;
    • for (int i = 0; i < param.size() - 1; i++) {
    • result += param[i];
    • result += ' ';
    • }
    • result += param[param.size() - 1];
    • return result;
    • } //Please fix!
    • }