CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    3

    Question Please help me with this page

    Hi all out here

    Please, please tell me if I'm using the correct method to output the total in this problem. I've attached the file at the bottom as a picture cos I wasn't too sure how to do it. Thanks

    Does it go like this:
    Input 55 then divide it by 10 which will be 5.5
    5.5 is not less than 1 so I choose the no answer, so my count now goes to two cos it was 1 first
    and since it is not lesser than 1
    I do it again by inputting 5.5 and dividing it by 10 which will now be 0.55
    It is now lesser than 1 so I choose the yes answer
    And my count goes to three
    So my first output answer will be 3

    Is it right, do I keep on inputting the numbers until it is lesser than 1, and increasing count each time until my answer comes to lesser than 1 then I write my output?


  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Please help me with this page

    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  3. #3
    Join Date
    Oct 2010
    Posts
    15

    Re: Please help me with this page

    Short answer: no, try again. You have the right idea but you're off by one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured