+ 2
What's the error in this code??
#include <iostream> #include<string> using namespace std; int main() { string name; cin >> name; try { if(name.size()<4 or name.size()>20) throw 9; cout<<"valid"; } catch(int x) { cout <<"invalid"; } return 0; }
4 Answers
+ 1
AAYUSH AGARWAL Can you add details or link of code coach?
May be it is not passing test case?
May be because, output expected the text with first letter is capital .. as "Valid" Or "Invalid" ?
+ 2
Jayakrishnađźđł it's solve now, thanks for help
+ 1
What error you getting? mention in detail..
+ 1
Jayakrishnađźđł it is coach problem so it does not verify it's output?