loading...

re: Daily Challenge #88 - Recursive Ninjas VIEW POST

FULL DISCUSSION
 
#include <sstream>
#include <string>

std::string chirp(size_t n_reps) {
    std::stringstream s;
    for (size_t i = 0; i < n_reps; ++i) {
        s << "chirp-";
    }
    std::string release = s.str();
    release.erase(--release.end());
    return release;
}

My first submission at Dev.To! (Excluding the welcome post). I love computer science.

code of conduct - report abuse