From a5a3c95f52d96fd8ae8b1c47aca752d47d34eae4 Mon Sep 17 00:00:00 2001 From: Ruslan2322 <62638170+Ruslan2322@users.noreply.github.com> Date: Wed, 22 Apr 2020 10:18:48 +0300 Subject: [PATCH] Create Exercise 1 --- Exercise 1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Exercise 1 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); + } +}