Question: Integer n is read from input. Then, six strings are read from input and stored in the list cashier _ line. Write multi - branch

Integer n is read from input. Then, six strings are read from input and stored in the list cashier_line. Write multi-branch if-else statements so that:
If n is 1, assign suffix with 'st'.
If n is 2, assign suffix with 'nd'.
If n is 3, assign suffix with 'rd'.
Otherwise, assign suffix with 'th'.
Lastly, output:
the n-th element of cashier_line
' is the '
n and suffix
' client in line.'

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!