#pseudocode homework help -- nested structures

4 messages · Page 1 of 1 (latest)

valid zephyr
#

i have been given a problem as so:
"Design nested decision structures that perform the following: If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2. (Also consider the possibility of amount1 == amount2)"

This is the pseudocode i have created:

Start
Declare Real amount1, amount2
Display “Please enter your first amount.”
Input amount1
Display “Please enter your second amount.”
Input amount2

If amount1 > 10 && amount2 < 100 Then
If amount1 > amount2 Then
Display amount1
Else
If amount1 < amount2 Then
Display amount2
Else
If amount1 == amount2 Then
Display “Your amounts are of equal value.”
Else
End if
End if
End if
Else
Display “One or both of your values exceed the limit.”
End If
End

i am quite lost and i don't know if my current code is correct. can somebody help me? (please tell me if this counts as academic dishonesty or if this isn't the right place to seek help for pseudocode)

shell mesa
#

Looks good to me logic wise depending on the style your going for you can skip using elses though since the amount1 to amount 2 relationship can only be one of the 3

valid zephyr
#

thank you for the feedback wolfcheer