BapBapuHa

Integer Operations

May 25th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.                 int a = Integer.parseInt(scanner.nextLine());
  9.                 int b = Integer.parseInt(scanner.nextLine());
  10.                 int c = Integer.parseInt(scanner.nextLine());
  11.                 int d = Integer.parseInt(scanner.nextLine());
  12.                 int x = (a + b) / c * d;
  13.         System.out.println(x);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment