Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package activities;
- public class PercentsAndConversion
- {
- public static void main(String[] args)
- {
- //1
- // east coast sales makes 62% of all sales
- //if company makes $4.6 mil in yearly revenue, how much did east cost div make
- double ECD_Rate = .62, totalRev = 4.6E6, ECD_sales;
- ECD_sales = totalRev * ECD_Rate;
- System.out.println("East Coast Sales Div. generated: $"+ECD_sales+" in sales");
- //2
- // if 1 acre = 43_560 ft, how many acres in 389_767
- double acre = 43560.0, acres;
- int ft = 389767;
- acres = ft / acre;
- System.out.println("there are: "+acres+" in 389,767 feet");
- //3
- // kat buys 600 shares at $21.77 each, must pay 2% fee to broker
- double pps = 21.77, feeRate = .02, fee, stock = 600, stockVal, total;
- stockVal = stock * pps;
- fee = stockVal * feeRate;
- total = stockVal + fee;
- System.out.println("stock value before commission: $"+ stockVal+
- "\n brokerage fee: $"+ fee+
- "\n total cost: $"+total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement