Skip to content

Commit 1da1d14

Browse files
committed
Aktualizacja7
1 parent e57c438 commit 1da1d14

File tree

3 files changed

+45
-34
lines changed

3 files changed

+45
-34
lines changed

.idea/workspace.xml

Lines changed: 34 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
399 Bytes
Binary file not shown.

src/math/Math1.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package math;
22

3+
import java.util.Scanner;
4+
35
import static java.lang.Math.pow;
46
import static java.lang.Math.sqrt;
57

68
public class Math1 {
79
public static void main(String[] args) {
810

9-
int a = 5;
10-
int b = 3;
11+
Scanner scanner = new Scanner(System.in);
12+
System.out.println("Podaj wartosć zmiennej a: ");
13+
int a = scanner.nextInt();
14+
System.out.println("Podaj wartosć zmiennej b: ");
15+
int b = scanner.nextInt();
16+
//scanner.close();
1117

1218
System.out.println(0.5*a*(a *sqrt(3)/2));
1319

@@ -19,8 +25,9 @@ public static void main(String[] args) {
1925
System.out.println((double) (grade1 + grade2 + grade3)/3);
2026

2127
System.out.println(a*b);
22-
23-
double salary_net = 8000;
28+
System.out.println("Podaj kwotę netto: ");
29+
double salary_net = scanner.nextDouble();
30+
scanner.close();
2431
int vat_tax = 23;
2532

2633
System.out.println(salary_net * (1 + (double)vat_tax/100));

0 commit comments

Comments
 (0)