Last active
June 29, 2022 18:19
-
-
Save irfanevrens/d45b988a94582e1ed21b10fd3a494dc6 to your computer and use it in GitHub Desktop.
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 Program { | |
public static void main(String[] args) { | |
final int SAYI_ADET = 10; | |
int[] sayilar = new int[SAYI_ADET]; | |
Scanner scanner = new Scanner(System.in); | |
for (int i = 0; i < SAYI_ADET; i++) { | |
System.out.print((i + 1) + ". sayıyı giriniz: "); | |
sayilar[i] = scanner.nextInt(); | |
} | |
scanner.close(); | |
int enKucukSayi = sayilar[0]; | |
for (int siradakiSayi : sayilar) { | |
if (siradakiSayi < enKucukSayi) { | |
enKucukSayi = siradakiSayi; | |
} | |
} | |
System.out.println("En küçük sayı: " + enKucukSayi); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment