Advertisement
deyanmalinov

01. Integer Operations

Feb 13th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.*;
  4.  
  5. public class Main {
  6.         public static void main(String[] args) {
  7.             Scanner scan = new Scanner(System.in);
  8.             long fnum = Long.parseLong(scan.nextLine());
  9.             long snum = Long.parseLong(scan.nextLine());
  10.             long tnum = Long.parseLong(scan.nextLine());
  11.             long cnum = Long.parseLong(scan.nextLine());
  12.  
  13.             long sum = fnum + snum;
  14.             long dev = sum / tnum;
  15.             long sumF = dev*cnum;
  16.             System.out.println(sumF);
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement