Help us understand the problem. What is going on with this article?

【Kotlin】Kotlin入門

【Kotlin】Kotlin入門

実行

Hello.kt
fun main(){
    println("Hello")
}
出力
Hello

配列

Array.kt
fun main(){
    val arr = arrayListOf("sato","suzuki","takahashi");
    println("朝食担当は" +arr[0] + "です")
    println("昼食担当は" +arr[1] + "です")
    println("夕飯担当は" +arr[2] + "です")
}
出力
朝食担当はsatoです
昼食担当はsuzukiです
夕飯担当はtakahashiです

条件分岐

Humidity.kt
fun main(){
      val hum = 50;

      if (hum >= 60){
        println("湿度が" + hum + "%です");
        println("ジメジメしてます");
      }else if((hum <= 60) && (hum >= 40)){
        println("湿度が" + hum + "%です");
        println("快適です");
      }else if(hum <= 40) {
        println("湿度が" + hum + "%です");
        println("カラカラしてます");
      }
}
出力
湿度が50%です
快適です

環境構築

windowsでJDKとエディターのVSCodeとkotlinのコンパイラをインストールしました。

参考文献

この記事は以下の情報を参考にして執筆しました。
キノコード / プログラミング学習動画のYouTuber

ne230025
Twitter始めました。https://twitter.com/ne230025
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした