So, I was using VScode to run my c++. Here is my code:
int main() {
int value = 153;
int output=0;
string number = to_string(value);
int exp = number.length();
for (char n :number) output += pow(n-'0',exp);
cout << output;
}
The output I get from using "Run Code" is 152, which is wrong. The output from using debug is 153,which is right. Why would that happen?