Hi so I was doing some
java excersies, then I came across this one:
Different packages of ground beef have different percentages of fat and different costs per pound. Write a program that asks the user for:
The price per pound of package "A"
The percent lean in package "A"
The price per pound of package "B"
The percent lean in package "B"
The program then calculates the cost per pound of lean (non-fat) beef for each package and writes out which is the best value.
Price per pound package A:
2.89
Percent lean package A:
85
Price per pound package B:
3.49
Percent lean package B:
93
Package A cost per pound of lean:3.4
Package B cost per pound of lean:3.752688
Package A is the best value
Assume that the two packages will not come out equal in value.
I came up with this: (Sorry for my noob code I am new to java coming from python.)
I don't think it is working right because when I enter what the guy entered in the exercise, my results come out different.
Don't know what I am doing I am probably overlooking something small :/.