Advertisement
Guest User

תרגיל 15% מיכל דלק

a guest
Feb 19th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class k {
  4.     public static void main(String[] args) {
  5.         Scanner s = new Scanner(System.in);
  6.         double fuelNow, tank;
  7.         System.out.println("how mach is your fuel tank?");
  8.         tank = s.nextDouble();
  9.         System.out.println("how mach fuel remand?");
  10.         fuelNow = s.nextDouble();
  11.         if (fuelNow <= tank * 0.15) {
  12.             System.out.println("u need to refuel your vehicle");
  13.         } else {
  14.             System.out.println("run Forest run");
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement