Skip to content

Commit e074faf

Browse files
refactor task 2.1 yet try
1 parent f297f87 commit e074faf

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/com/calculationFormulas/calculationFormulas.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public static void main(String[] args) {
88

99
Scanner scanner = new Scanner(System.in);
1010
int x = scanner.nextInt();
11+
int a = scanner.nextInt();
1112

1213
/*
1314
int y = 17;
@@ -20,9 +21,11 @@ public static void main(String[] args) {
2021
System.out.println(x1 + " " + x2);
2122
*/
2223

23-
int function = (int) (17 * Math.pow(x,2) - (6 * x) + 13);
24+
int functionA = (int) (17 * Math.pow(x,2) - (6 * x) + 13);
25+
int functionB = (int) (3 * Math.pow(a,2) + (5 * a) - 21);
2426

25-
System.out.println(function);
27+
System.out.println(functionA);
28+
System.out.println(functionB);
2629
}
2730
}
2831
// Task 2.1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
package com.calculationFormulas;
22

33
public class calculationFormulas3 {
4+
5+
public static void main(String[] args) {
6+
7+
8+
9+
}
410
}

0 commit comments

Comments
 (0)