-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperatorsuzbolme.java
More file actions
41 lines (24 loc) · 880 Bytes
/
Operatorsuzbolme.java
File metadata and controls
41 lines (24 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package operatorsuzbolme;
import java.util.Scanner;
public class Operatorsuzbolme{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
System.out.println("Lütfen Bölüneni Giriniz.");
int bolunen=scan.nextInt();
System.out.println("Lütfen Böleni Giriniz.");
int bolen=scan.nextInt();
int bolum=0;
if(bolunen==bolen){
bolum=1;
bolunen=bolunen-bolen;
}
for (int i = 0; bolen<=bolunen; i++) {
if(bolunen>bolen){
bolunen=bolunen-bolen;
bolum+=1;
}
}
System.out.println("Kalan: "+bolunen);
System.out.println("Bölüm: "+bolum);
}
}