Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5977dbf

Browse files
author
İSMAİL TAŞDELEN
committed
master
1 parent 1815bb9 commit 5977dbf

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/Java_Project_24/build/
55
/Java_Project_24/nbproject/private/
66
/Java_Project_25/build/
7-
/Java_Project_26/nbproject/private/
7+
/Java_Project_26/nbproject/private/
8+
/Java_Project_26/build/

Java_Project_26/src/java_project_26/Java_Project_26.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* and open the template in the editor.
55
*/
66
package java_project_26;
7-
7+
import java.util.Scanner;
88
/**
99
*
1010
* @author ismailtasdelen
@@ -16,6 +16,22 @@ public class Java_Project_26 {
1616
*/
1717
public static void main(String[] args) {
1818
// TODO code application logic here
19+
//
20+
// Örnek :
21+
//
22+
double avm, indirim=0, odeme=0;
23+
Scanner tara = new Scanner(System.in);
24+
System.out.println("Alışveriş miktarınızı giriniz : ");
25+
avm = tara.nextDouble();
26+
if (avm <= 1000)
27+
indirim = avm * 5 / 100;
28+
else if (avm >= 1000 & avm < 10000)
29+
indirim = avm * 8 /100;
30+
else if (avm >=10000)
31+
indirim = avm * 8.5 / 100;
32+
33+
odeme = avm - indirim;
34+
System.out.println("Ödenecek :" + odeme);
1935
}
2036

2137
}

0 commit comments

Comments
 (0)