Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Little man program

  1. Nov 19, 2012 #1
    Write a Little Man program to accept an unknown amount of input values. the largest value enetered will be the output value. the value 0 should be used as a

    flag to indicate the end of input.
    Any suggestions please help,
     
  2. jcsd
  3. Nov 19, 2012 #2

    phinds

    User Avatar
    Gold Member

    Please post this in the proper format for homework problems and show what you have been able to do yourself and ask specific question about what you are stuck on.

    Also, you should read the forum rules. Just asking for an answer is not how this forum works.
     
  4. Nov 19, 2012 #3
    basically i just want to know should a loop be used and how is the value stored thanks
     
  5. Nov 19, 2012 #4

    jim mcnamara

    User Avatar
    Science Advisor
    Gold Member

    The value is stored in an integer variable. The loop stops when the variable gets set to zero.

    Please post all of you requirements, this is clearly homework. We need to know what language(s) you are required to use, etc.
     
  6. Nov 19, 2012 #5

    phinds

    User Avatar
    Gold Member

    Also, post your work here in the forum, not in a PM to me.
     
  7. Nov 19, 2012 #6

    jtbell

    User Avatar

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?