File tree Expand file tree Collapse file tree 10 files changed +250
-0
lines changed Expand file tree Collapse file tree 10 files changed +250
-0
lines changed Original file line number Diff line number Diff line change 1+ # ## IntelliJ IDEA ###
2+ out /
3+ ! ** /src /main /** /out /
4+ ! ** /src /test /** /out /
5+
6+ # ## Eclipse ###
7+ .apt_generated
8+ .classpath
9+ .factorypath
10+ .project
11+ .settings
12+ .springBeans
13+ .sts4-cache
14+ bin /
15+ ! ** /src /main /** /bin /
16+ ! ** /src /test /** /bin /
17+
18+ # ## NetBeans ###
19+ /nbproject /private /
20+ /nbbuild /
21+ /dist /
22+ /nbdist /
23+ /.nb-gradle /
24+
25+ # ## VS Code ###
26+ .vscode /
27+
28+ # ## Mac OS ###
29+ .DS_Store
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class GeometrikAlanHesaplama {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .println ("Alanını hesaplamak istediğiniz şekli seçin:" );
7+ System .out .println ("1 - Dikdörtgen" );
8+ System .out .println ("2 - Kare" );
9+ System .out .println ("3 - Üçgen" );
10+ int secim = scanner .nextInt ();
11+
12+ double alan = 0 ;
13+
14+ switch (secim ) {
15+ case 1 :
16+ System .out .print ("Dikdörtgenin uzun kenarını girin: " );
17+ double uzunKenar = scanner .nextDouble ();
18+ System .out .print ("Dikdörtgenin kısa kenarını girin: " );
19+ double kisaKenar = scanner .nextDouble ();
20+ alan = uzunKenar * kisaKenar ;
21+ break ;
22+ case 2 :
23+ System .out .print ("Karenin bir kenarını girin: " );
24+ double kenar = scanner .nextDouble ();
25+ alan = kenar * kenar ;
26+ break ;
27+ case 3 :
28+ System .out .print ("Üçgenin taban uzunluğunu girin: " );
29+ double taban = scanner .nextDouble ();
30+ System .out .print ("Üçgenin yüksekliğini girin: " );
31+ double yukseklik = scanner .nextDouble ();
32+ alan = (taban * yukseklik ) / 2 ;
33+ break ;
34+ default :
35+ System .out .println ("Geçersiz şekil seçimi" );
36+ }
37+
38+ System .out .println ("Alan: " + alan );
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class HavaDurumu {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Hava durumu kodunu girin: " );
7+ int havaKodu = scanner .nextInt ();
8+
9+ switch (havaKodu ) {
10+ case 1 :
11+ System .out .println ("Hava güneşli" );
12+ break ;
13+ case 2 :
14+ System .out .println ("Hava bulutlu" );
15+ break ;
16+ case 3 :
17+ System .out .println ("Hava yağmurlu" );
18+ break ;
19+ default :
20+ System .out .println ("Geçersiz hava durumu kodu" );
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class HesapMakinesi {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("İki sayı girin: " );
7+ double sayi1 = scanner .nextDouble ();
8+ double sayi2 = scanner .nextDouble ();
9+
10+ System .out .println ("Yapmak istediğiniz işlemi seçin:" );
11+ System .out .println ("1 - Toplama" );
12+ System .out .println ("2 - Çıkarma" );
13+ System .out .println ("3 - Çarpma" );
14+ System .out .println ("4 - Bölme" );
15+ int secim = scanner .nextInt ();
16+
17+ switch (secim ) {
18+ case 1 :
19+ System .out .println ("Toplama: " + (sayi1 + sayi2 ));
20+ break ;
21+ case 2 :
22+ System .out .println ("Çıkarma: " + (sayi1 - sayi2 ));
23+ break ;
24+ case 3 :
25+ System .out .println ("Çarpma: " + (sayi1 * sayi2 ));
26+ break ;
27+ case 4 :
28+ if (sayi2 != 0 ) {
29+ System .out .println ("Bölme: " + (sayi1 / sayi2 ));
30+ } else {
31+ System .out .println ("Bir sayı sıfıra bölünemez!" );
32+ }
33+ break ;
34+ default :
35+ System .out .println ("Geçersiz işlem seçimi" );
36+ }
37+ }
38+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class KDVHesabi {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Lütfen ürün tutarını girin: " );
7+ double tutar = scanner .nextDouble ();
8+
9+ double kdvOrani = 0.3 ;
10+ double kdvTutari = tutar * kdvOrani ;
11+ double kdvliFiyat = tutar + kdvTutari ;
12+
13+ System .out .println ("KDV'siz Fiyat: " + tutar );
14+ System .out .println ("KDV'li Fiyat: " + kdvliFiyat );
15+ System .out .println ("KDV Tutarı: " + kdvTutari );
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class KdvSoru {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Lütfen tutarı girin: " );
7+ double tutar = scanner .nextDouble ();
8+
9+ double kdvOrani ;
10+ if (tutar > 0 && tutar <= 1000 ) {
11+ kdvOrani = 0.1 ;
12+ } else {
13+ kdvOrani = 0.22 ;
14+ }
15+
16+ double kdvTutari = tutar * kdvOrani ;
17+ System .out .println ("KDV Tutarı: " + kdvTutari );
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ //TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
2+ // click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
3+ public class Main {
4+ public static void main (String [] args ) {
5+ //TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
6+ // to see how IntelliJ IDEA suggests fixing it.
7+ System .out .printf ("Hello and welcome!" );
8+
9+ for (int i = 1 ; i <= 5 ; i ++) {
10+ //TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
11+ // for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
12+ System .out .println ("i = " + i );
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class NotHesaplama {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Notunuzu girin: " );
7+ int not = scanner .nextInt ();
8+
9+ if (not >= 90 && not <= 100 ) {
10+ System .out .println ("AA" );
11+ } else if (not >= 80 && not < 90 ) {
12+ System .out .println ("BA" );
13+ } else if (not >= 70 && not < 80 ) {
14+ System .out .println ("BB" );
15+ } else if (not >= 60 && not < 70 ) {
16+ System .out .println ("CB" );
17+ } else if (not >= 50 && not < 60 ) {
18+ System .out .println ("CC" );
19+ } else {
20+ System .out .println ("FF" );
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class Siralama {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Üç sayı girin: " );
7+ int sayi1 = scanner .nextInt ();
8+ int sayi2 = scanner .nextInt ();
9+ int sayi3 = scanner .nextInt ();
10+
11+ if (sayi1 <= sayi2 && sayi1 <= sayi3 ) {
12+ if (sayi2 <= sayi3 ) {
13+ System .out .println ("Sıralama: " + sayi1 + ", " + sayi2 + ", " + sayi3 );
14+ } else {
15+ System .out .println ("Sıralama: " + sayi1 + ", " + sayi3 + ", " + sayi2 );
16+ }
17+ } else if (sayi2 <= sayi1 && sayi2 <= sayi3 ) {
18+ if (sayi1 <= sayi3 ) {
19+ System .out .println ("Sıralama: " + sayi2 + ", " + sayi1 + ", " + sayi3 );
20+ } else {
21+ System .out .println ("Sıralama: " + sayi2 + ", " + sayi3 + ", " + sayi1 );
22+ }
23+ } else {
24+ if (sayi1 <= sayi2 ) {
25+ System .out .println ("Sıralama: " + sayi3 + ", " + sayi1 + ", " + sayi2 );
26+ } else {
27+ System .out .println ("Sıralama: " + sayi3 + ", " + sayi2 + ", " + sayi1 );
28+ }
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ import java .util .Scanner ;
2+
3+ public class TekCift {
4+ public static void main (String [] args ) {
5+ Scanner scanner = new Scanner (System .in );
6+ System .out .print ("Bir sayı girin: " );
7+ int sayi = scanner .nextInt ();
8+
9+ if (sayi % 2 == 0 ) {
10+ System .out .println ("Girilen sayı çifttir." );
11+ } else {
12+ System .out .println ("Girilen sayı tektir." );
13+ }
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments