diff --git a/Exercise 1 b/Exercise 1 new file mode 100644 index 0000000..bfa8b2f --- /dev/null +++ b/Exercise 1 @@ -0,0 +1,19 @@ +package TEst; + +import java.util.Scanner; + +//Найдите значение функции: z = ( (a – 3 ) * b / 2) + c. + +public class TestMain { + public static void main(String[] args) { + Scanner s = new Scanner(System.in); + System.out.println("Введите значение а: "); + int a = s.nextInt(); + System.out.println("Введите значение b: "); + int b = s.nextInt(); + System.out.println("Введите значение c: "); + int c = s.nextInt(); + double z = (((a-3)*b/2)+c); + System.out.println(z); + } +}