Last active
August 29, 2015 14:06
-
-
Save javadovjavad/27020fe12af6772b019d 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 DordIslem { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
while (true) { | |
System.out.println("Ne etmek isteyirsiniz?"); | |
System.out.println("1.Vurma, 2.Bolme, 3.Toplama, 4.Cixma"); | |
double input= sc.nextInt(); | |
System.out.println("1ci reqemi daxil edin:"); | |
int say1 = sc.nextInt(); | |
System.out.println("2ci reqemi daxil edin:"); | |
int say2 = sc.nextInt(); | |
if (input==1){ System.out.println("Vurma cemi: "+(say1*say2));} | |
else if(input==2){System.out.println("Bolme cemi: "+(say1/say2));} | |
else if(input==3){System.out.println("Toplama cemi: "+(say1+say2));} | |
else if(input==4){System.out.println("cixma cemi: "+(say1-say2));} | |
System.out.println("Davam etmek isteyirsiniz? 0 -beli, 1 -yox"); | |
input = sc.nextInt(); | |
if (input==0){ | |
continue; | |
}else{ | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment