Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

agdgdgdgwngo

  • 2 years ago

Here's a programming task, to be done in your language of choice: Write a function that takes a base-10 integer (don't worry about the sign) as input and outputs a string that is the English sentence for the number: int_to_word(7919) -> seven thousand nine hundred nineteen

  • This Question is Closed
  1. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    bonus if you make it work for negative numbers. bonus if you make it work for fractions like 51.2202 bonus if you make it work with arbitrarily long numbers like some huge factorial.

  2. Tomas.A
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    if you enter 7919 in your code, i doubt you will get seven thousand nine hundred nineteen

  3. jaskaran
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    sorry i didn't saw that thing , i'm just gonna take it off and post it later on after correction.

  4. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    nobody wants to do it? :( I'll get to it myself

  5. Tomas.A
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i will do it sometime later :D

  6. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    http://ideone.com/nOnzN Now if anyone can help me debug it :-D

  7. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    http://ideone.com/gAjDN

  8. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Found the bug, replaced || by && in the getstring() procedure and now it works fine. http://ideone.com/NP9ZE

  9. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    http://ideone.com/oI2rZ#

  10. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    http://ideone.com/NHiTY

  11. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.