Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Number 12
- import java.util.*;
- public class Pg301_14
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- System.out.println("How much will John be spending?");
- double amount = console.nextDouble();
- System.out.println("How much will Jane be spending?");
- double amount = console.nextDouble;
- Calculate( amount1, amount2);
- return();
- }
- public static double Calculate(double x, double y)
- int numBills = (int) (x/20.0);
- if (numBills * 20.0 < x)
- {
- numBills++
- }
- int numBills2 = (int) (x/20.0);
- if (numBills2 * 20.0 < x)
- {
- numBills2++
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement