Question
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
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.
Write a Kotlin program with delcares a variable assigns it a value between 0 and 23. 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.
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 = Ray and Age = 25
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started