State the most suitable data type for the following variables used in the algorithm described in Figure 1.
cartTotal ← USERINPUT
membershipYears ← USERINPUT
discountPercent ← 0.0
statusText ← "Non-member rate applied"
errorMsg ← "Invalid cart amount"
IF cartTotal > 0.0 THEN
IF membershipYears >= 3 THEN
discountPercent ← 15.5
OUTPUT discountPercent
ELSE
OUTPUT statusText
ENDIF
ELSE
OUTPUT errorMsg
ENDIF
| Variable identifier | Data type |
|---|---|
discountPercent | |
statusText |