Question
2.Write only the select case statements for
the following problem statement.
The marital code of a person is stored in
the variable called marCode. Display the
corresponding description on the screen.
Provide for an incorrect marital code
Marital Code
S Single
D Divorced
M Married
W Widowed
I Incorrect
the following problem statement.
The marital code of a person is stored in
the variable called marCode. Display the
corresponding description on the screen.
Provide for an incorrect marital code
Marital Code
S Single
D Divorced
M Married
W Widowed
I Incorrect
Answers
print
select code {
S: Single
D: Divorced
M: Married
W: Widowed
else: Incorrect
};
use syntax appropriate for your programming language.
select code {
S: Single
D: Divorced
M: Married
W: Widowed
else: Incorrect
};
use syntax appropriate for your programming language.
if marital s=s then
Select case marCode
case “S”
display “Single”
case “D”
display “Divorced”
case “M”
display “Married”
case “W”
display “Widowed”
case else
display ”Incorrect”
endselect
case “S”
display “Single”
case “D”
display “Divorced”
case “M”
display “Married”
case “W”
display “Widowed”
case else
display ”Incorrect”
endselect
Related Questions
Professor Phil wishes to study the marital expectations of men and women.
State the independent var...
When using try / except to protect risky code, where should you place statements that are likely to...
In research that examined adaptation to the transition to parenthood, Belsky and Rovine found that...
Read the statements below. Select "L" if the statement describes the Linux OS. Select "M" if the sta...