Int greater than 10


#1

i’m getting letters instead of numbers for all entries greater than 10. what is wrong?


#2

Hi,

We’ll need to have more context than this to answer your question properly. However, it appears to be a programming issue, and not one related to Cloud9. For purely code related issues, the best place to ask would be StackOverflow.com.

However, if you think this issue is related to Cloud9, please send us more details (code, exact error, screenshots etc.) and we’ll be happy to help.

Regards,
​Mutahhir


#3

hi,
thanks for response.
i’m not sure if the question is related to Cloud9, but i’m include a print screen from the problem i’m facing.
i’m trying to make a code for week 1 cs50.
when i started running the code, entries less than 10 give correct result but more than ten give output as letters.


i can’t figure what i have done wrong


#4

Hi,

You’re using the %x formatter, which outputs Hex. So, 10 is A in Hex. To get a decimal result, use the %d instead.

Regards,
​Mutahhir


#5

thank you very much, its working now.
you are a life saver.