Advertisement
daixso

Ballsed up math

Jul 27th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. public class Wtf {
  2.     public static void main(String args[]){
  3.         int shirt = 97;
  4.         int you = 100;
  5.         int mom = 50;//how much you owe mom
  6.         int dad = 50;//how much you owe dad
  7.        
  8.         System.out.printf("You want to by a shirt for $%d, you borrow $%d from mom, and $%d from dad!\nYou now have $%d!\n", shirt, mom, dad, you);
  9.         you=you-shirt;
  10.         System.out.printf("You buy the shirt, you now have $%d! and must pay back your parents!", you);
  11.         mom-=1;//pay mom back 1 dollar
  12.         dad-=1;//pay dad back 1 dollar
  13.         you-=2;//take 2 dollars from yourself and keep one
  14.         System.out.printf("You give one dollar to your mom, you now owe her $%d, and one to your father and now owe him $%d!\n", mom, dad);
  15.         System.out.printf("You now have $%d!\n", you);
  16.         int total=mom+dad+you;
  17.         int missing=100-total;
  18.         System.out.printf("The total amount of money you, and your parents have is now $%d, and you are missing $%d!", total, missing);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement