Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   If-Then-Else statements (https://www.askmehelpdesk.com/showthread.php?t=380318)

  • Jul 27, 2009, 07:06 AM
    andyhaus1057
    If-Then-Else statements
    How would I display an If-Then-Else statement that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “Invalid points.” Otherwise, it should display “Valid points.”
  • Oct 17, 2010, 11:20 AM
    karilynngodd
    Hope you found the answer by now but here is what the pseudocode looks like :)


    //This program is to determine whether the points are valid

    //Declare variables
    Declare real points

    //Get the number of points
    Display “Enter the number of points.”
    Input points

    //Determine if the number of points is valid
    If points < 9 and points > 51 Then
    Display “Invalid points”
    Else
    Display “Valid points”
    End If
  • Oct 17, 2010, 11:21 AM
    karilynngodd
    Woah... that didn't turn out right like it was supposed to.

    The ” are supposed to be quotation marks sorry

  • All times are GMT -7. The time now is 03:38 AM.