So the exercise that i have wants me to find how many numbers are missing from the telephone number from 0 to 9 and which numbers are these.Also the telephone number cannot have more than 10 numbers. For example:
Input
3
0631562976
0426578943
0126456788
Output
2
4 8
1
1
2
3 9
The problem is i don't get why my program does not work properly.It seems fine to me and i think it should work.Is there something missing?
You are attempting to compare ints with chars on line 20. 5 is not the same as '5'. Change line 20 to if ( i == s1[j] - '0' )
since (for example) '5' -'0' will give 5.
Your code is almost impossible to read because the indenting is inconsistent, and almost impossible to run because there are no prompts to input any data.