Thread: Asks to input number nad if outside number asks to put in number within bounds

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    5

    Asks to input number nad if outside number asks to put in number within bounds

    Hi all,
    I have to write a program that will ask you to put in a number between 0 and 9 and multiply it by pi. If the number put in is between 0 and 9 then pi is multiplied but if it isnt between 0 or 9, it will say the number is not between 0 and 9 and asks you to put it in again and will repeat until a number between 0 and 9 is put in.
    I have got the program working to the extent that it the number is between 0 and 9 it will multiply it by pi but if its not between 0 and 9 it will say the number is not between 0 and 9 and ask to put in a new number.
    I can't work out how to get the program to repeat itself if the number entered isnt between 0 and 9.
    I have enclosed the code below, can anyone help me with this?
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Random Number Bounds
    By deeisenberg in forum C Programming
    Replies: 1
    Last Post: 03-05-2012, 12:11 PM
  2. Replies: 8
    Last Post: 12-30-2010, 10:08 PM
  3. Replies: 5
    Last Post: 10-05-2009, 10:21 AM
  4. Input a Hex number and output hex number to a text field
    By zoobaby in forum C++ Programming
    Replies: 4
    Last Post: 05-12-2009, 11:26 AM
  5. Allocation of major number and minor number linux
    By vinayharitsakp@ in forum Linux Programming
    Replies: 4
    Last Post: 12-08-2007, 02:01 PM