This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Program to print decimal no. 13 on LCD

hi friends i am trying to print all the decimal no's on LCD but i am able to print till 9 only after that i am getting : ; so on

Parents
  • A friend of mine also tried to print all decimals. He got tired after having printed the first billions of numbers. How much patience do you have?

    By the way - exactly what do you expect to happen after 9?

    How would you express 1,104,184,835,583 if you expect each decimal number to be represented by a single character. Even if using UTF instead of ASCII, the number of defined characters is very limited. UTF16 can have max 2^16 characters which would only cover 0 to 65535 if used just to store the first non-negative integers.

    For hexadecimal, the next value to print would after 9 be A, but for decimal, it's time to switch to two digits. What have you done in your code to switch to two digits instead of just trying to use the next ASCII character available?

Reply
  • A friend of mine also tried to print all decimals. He got tired after having printed the first billions of numbers. How much patience do you have?

    By the way - exactly what do you expect to happen after 9?

    How would you express 1,104,184,835,583 if you expect each decimal number to be represented by a single character. Even if using UTF instead of ASCII, the number of defined characters is very limited. UTF16 can have max 2^16 characters which would only cover 0 to 65535 if used just to store the first non-negative integers.

    For hexadecimal, the next value to print would after 9 be A, but for decimal, it's time to switch to two digits. What have you done in your code to switch to two digits instead of just trying to use the next ASCII character available?

Children