Created
January 21, 2022 00:17
-
-
Save smyy96/dff3cc7b2d7fe01cc2c384304d4a6214 to your computer and use it in GitHub Desktop.
Patika Java 101 - Hava Sıcaklığına Göre Etkinlik Önerme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class HavaDurumu { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
int sicaklik; | |
System.out.print("Sıcaklık Giriniz:"); | |
sicaklik = input.nextInt(); | |
if (sicaklik < 5) | |
System.out.print("Kayak yapmalısın."); | |
else if (sicaklik >= 5 && sicaklik < 15) | |
System.out.print("Sinemaya gitmelisin"); | |
else if (sicaklik >= 15 && sicaklik < 25) | |
System.out.print("Piknik yapmalısın."); | |
else | |
System.out.print("Yüzmeye gitmelisin."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment