0
Why the (if) doesn't show up? Please help!
I written this code that asks the user to write their ID and contact number, But contact number should be 10 digits. The problem is first print sentence doesn't show up when I write 10 number!!. https://code.sololearn.com/cw4t3wFeGN54/?ref=app
2 Respuestas
+ 1
Your if statement compares a string to an integer thats why there is an error.
What is idPassportNum for i dont see it being used. And if you redefine contactNum to "contactNum" after the input why take in an input for it in the first place?
I think you're trying to do this
https://code.sololearn.com/cKB2PArnWrTF/?ref=app
+ 2
get the length then compare them with 10
contactNum.length() == 10