My issue
include <bits/stdc++.h>
using namespace std;
int main() {
string txt = “NumeroTres”;
cout << “The legth of the word is:” << txt.length();
return 0;
}
what is wrong with this code ?
why does it show wrong answer ?
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
string txt = "NumeroTres";
cout << "The legth of the word is:" << txt.length();
return 0;
}
Learning course: Learn C++
Problem Link: CodeChef: Practical coding for everyone