Home Forums C Programming help…

Viewing 2 reply threads
  • Author
    Posts
    • #2117
      kokila
      Participant

      im trying my best to solve this.. but it is so confusing…im a Com.Sci freshman..Write a program that accepts a number and outputs its equivalent in word.

      For example:
      Input: 1380
      Output: One thousand three hundred eighty

      Limit the number to be inputted from 0 to 3000.plss……tnx in advance!!

    • #3408
      Humayan
      Participant

      Wow tedious! I would just use a series of conditional statements:

       
      and so on for the “hundreds” position the “ty’s” ( twenty , thirty …. ) the teens ( 19 , 18 , 17 ….. ) and singles ( 9 , 8 , 7 ….. ) . Not a difficult program , just a pain to write ……..

      • This reply was modified 5 years, 10 months ago by M. Saqib.
      • This reply was modified 1 month, 3 weeks ago by M. Saqib.
      • This reply was modified 1 month, 3 weeks ago by M. Saqib.
    • #3409
      kokila
      Participant

      it really help me!!…

      tnx again!!

      • This reply was modified 5 years, 10 months ago by M. Saqib.
      • This reply was modified 1 month, 3 weeks ago by M. Saqib.
Viewing 2 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.