Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a Kotlin program that declares two variables: one that stores a name as a string and another that stores an age as an

1. Write a Kotlin program that declares two variables: one that stores a name as a string and another that stores an age as an integer. Print out a string that contains those variables using string template. Example output: `Name = Nick and Age = 55`

2. Write a Kotlin program with declares a variable assigns it a value between 5 and 30. Print "good morning" if the variable is less than 12, "good afternoon" if the variable is between 12 and 18 and good evening if the variable is greater than 18.

3. Write a Kotlin program that contains two loops, (1) a for loop that prints out the numbers 1-10 and (2) a while loop that prints out the even numbers between 0 and 30.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Each pair must agree on a single choice for each round.

Answered: 1 week ago