Challenge: Suspension Coroutine with Specified Type for Output

Solve a challenge regarding suspension.

We'll cover the following

Problem

Write a suspend coroutine that specifies the type of output in its continuation. The output cases should be of three kinds: String, Boolean, and Int.

Restriction

The output will be available in the terminal.

Output

An Int, String, and a Boolean type's values as output.

Get hands-on with 1400+ tech skills courses.