iLLcheff

converter

Sep 13th, 2022
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args){
  5.         Scanner sc = new Scanner(System.in);
  6.  
  7.         int m = Integer.parseInt(sc.nextLine());
  8.         double result = Math.floor(((100 / 1.6) / m) * 4.54);
  9.         System.out.printf("%.0f litres per 100 km", result);
  10.  
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment