getting numbers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • beginers of c

    #1

    getting numbers

    hai friends
    see i have to get numbers in this manner
    3 4 5 6 7 8 9
    ok.And also my numbers should not be larger than 9.so for each number
    the condition has to be checked if it's great than 9 , then the pgm
    should return 0.
    for above pgm
    when 3 is entered the condition should be checked,if it's
    correct then i should be allowed to enter the next number.

  • Richard Bos

    #2
    Re: getting numbers

    beginers of c <ssksakthi@gmai l.comwrote:
    hai friends
    Hello, homework cheater. Be advised that I do not consider homework
    cheaters to be my friends.
    see i have to get numbers in this manner
    3 4 5 6 7 8 9
    ok.And also my numbers should not be larger than 9.so for each number
    the condition has to be checked if it's great than 9 , then the pgm
    should return 0.
    for above pgm
    when 3 is entered the condition should be checked,if it's
    correct then i should be allowed to enter the next number.
    How about... you do your own homework? If you have made a decent
    attempt, show us what you have and tell us what your problem with it is.
    If you haven't had a good hard stab at it, do so now. You will never
    learn if you get others to do your homework for you.

    Richard

    Comment

    • Shadowman

      #3
      Re: getting numbers

      beginers of c wrote:
      hai friends
      see i have to get numbers in this manner
      3 4 5 6 7 8 9
      ok.And also my numbers should not be larger than 9.so for each number
      the condition has to be checked if it's great than 9 , then the pgm
      should return 0.
      for above pgm
      when 3 is entered the condition should be checked,if it's
      correct then i should be allowed to enter the next number.
      >
      There's a Coors Light commercial with former Coach Bill Parcells in a
      post-game press conference. An excerpt:

      Q: "Coach! I have a question! I love cold Coors Light!"

      Bill: "That's really not a question."

      --
      SM
      rot13 for email

      Comment

      • Walter Roberson

        #4
        Re: getting numbers

        In article <473B6975.477D@ mindspring.com> ,
        pete <pfiland@mindsp ring.comwrote:
        >santosh wrote:
        >>
        >In article <1195057107.667 930.145470@z24g 2000prh.googleg roups.com>,
        >beginers of c <ssksakthi@gmai l.comwrote on Wednesday 14 Nov 2007 9:48
        >pm:
        And also my numbers should not be larger than 9.so for each number
        the condition has to be checked if it's great than 9 , then the pgm
        should return 0.
        >This statement:
        >"when 3 is entered the condition should be checked,if it's
        correct then i should be allowed to enter the next number."
        >Why is that statement written as though
        >we don't know whether or not entering 3 satisfies that condition?
        >What condition are we talking about?
        The condition of not being greater than 9?

        see i have to get numbers in this manner
        3 4 5 6 7 8 9
        ok.And also my numbers should not be larger than 9.so for each number
        the condition has to be checked if it's great than 9 , then the pgm
        should return 0.
        for above pgm
        when 3 is entered the condition should be checked,if it's
        correct then i should be allowed to enter the next number.
        If the numbers are supposed to be entered on a single line, as
        showin "in this manner", then to "be allowed to enter the next number"
        implies that after number greater than 9 is found, that the
        user should not be "allowed" to enter further numbers on the same line.
        That implies examining the input as it is typed, not just when the
        line is completed. Unfortunately for the original poster, examining
        input as it is typed in is not something that can be done with the
        facilities provided by the C I/O library, and requires system-specific
        extensions.

        --
        "Beware of bugs in the above code; I have only proved it correct,
        not tried it." -- Donald Knuth

        Comment

        • pete

          #5
          Re: getting numbers

          Walter Roberson wrote:
          >
          In article <473B6975.477D@ mindspring.com> ,
          pete <pfiland@mindsp ring.comwrote:
          This statement:
          "when 3 is entered the condition should be checked,if it's
          correct then i should be allowed to enter the next number."
          Why is that statement written as though
          we don't know whether or not entering 3 satisfies that condition?
          What condition are we talking about?
          >
          The condition of not being greater than 9?
          It seems strange to discuss what a program should do,
          *if* 3 turns out to be not greater than 9.

          --
          pete

          Comment

          Working...