Hello, I am learning C++.
I started solving the Raindrops problem in the C++ learning track.
But I am stuck on it for a few days now.
Could somebody please review my code and the error I am getting and help me make some sense to it? And guide to towards solving this problem.
My code:
#include "raindrops.h"
#include <string>
namespace raindrops {
string convert(int x) {
string result = "";
if (x%3==0) {
result += "Pling";
}
if (x%5==0) {
result += "Plang";
}
if (x%7==0) {
result += "Plong";
}
else {
result += to_string(x)
}
return result;
}
} // namespace raindrops
unfortunately due to the word limit, I am unable to paste the error I am getting.
My setup is simply the exercism’s web editor.
I would appreciate any help that I could get.
Thanks!