Skip to content

Commit

Permalink
hesap makinesi eklendi
Browse files Browse the repository at this point in the history
  • Loading branch information
bugrahaskan committed Oct 31, 2022
1 parent 80a6746 commit 3d36289
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions hesapMakinesi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import java.util.Scanner;

public class hesapMakinesi {
public static void main(String[] args) {
int n1, n2, select;

Scanner input = new Scanner(System.in);
System.out.println("İlk Sayıyı Giriniz : ");
n1 = input.nextInt();
System.out.println("İkinci Sayıyı Giriniz : ");
n2 = input.nextInt();

System.out.println("1-Toplama\n2-Çıkarma\n3-Çarpma\n4-Bölme");
System.out.print("Seçiminiz : ");
select = input.nextInt();

switch(select)
{
case 1:
System.out.println("Toplam : " + (n1+n2));
break;
case 2:
System.out.println("Çıkarma : " + (n1-n2));
break;
case 3:
System.out.println("Çarpma : " + (n1*n2));
break;
case 4:
System.out.println("Bölme : " + (n1/n2));
break;
default:
System.out.println("Geçerli bir işlem giriniz.");
break;
}
}
}

0 comments on commit 3d36289

Please sign in to comment.