Showing posts with label Validation. Show all posts
Showing posts with label Validation. Show all posts
Tuesday, 13 August 2013
And
The value that needs to be stored in Number to display the message "This number does not meet the condition" are 7 or less or 11 or higher.
Monday, 12 August 2013
Or
The numbers 5, 6, 7 and 8 would need to be stored in Number to make the program display the message "This number does not meet the condition".
Validation and error trapping
1.
If ItemWeight is a number and CostPerKilo is a number
Pseudocode
Calculate price of sending parcel
Prompt user for ItemWeight, CostPerKilo
Get ItemWeight, CostPerKilo
If ItemWeight is a number and CostPerKilo is a number
CostofSendingParcel = ItemWeight * CostPerKilo
If CostofSendingParcel < 100
Display CostofSendingParcel
Else
CostAfterDiscount = CostofSendingParcel * 0.9
Display CostAfterDiscount
End If
Else Display ErrorMessage
Else Display ErrorMessage
Subscribe to:
Posts (Atom)