Skip to content

Instantly share code, notes, and snippets.

@smyy96
Created January 21, 2022 00:17
Show Gist options
  • Save smyy96/dff3cc7b2d7fe01cc2c384304d4a6214 to your computer and use it in GitHub Desktop.
Save smyy96/dff3cc7b2d7fe01cc2c384304d4a6214 to your computer and use it in GitHub Desktop.
Patika Java 101 - Hava Sıcaklığına Göre Etkinlik Önerme
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