Mrgentledolphin

calcolo scatti

Nov 30th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. package scuola;
  2. import java.util.*;
  3. public class IVA1 {
  4.  
  5.     public static void main(String[] args) {
  6.         // TODO Auto-generated method stub
  7.         Scanner input;
  8.         input=new Scanner (System.in);
  9.        
  10.         int scatti, scatp;
  11.         double boll;
  12.        
  13.         System.out.println("scatti lettura precedente ");
  14.         scatp=input.nextInt();
  15.         System.out.println("numero scatti ");
  16.         scatti=input.nextInt();
  17.        
  18.         boll=26.80;
  19.         if (scatp<150){
  20.             boll=boll+scatti*0.10;
  21.         }
  22.         else
  23.         {
  24.             boll=boll+scatti*0.20;
  25.         }
  26.         System.out.println("bolletta: "+boll);
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment