There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Lexi Turgeon wrote:I have a method that inverts the fractions so that the numerator becomes the denominator.
...
But when I put that code in main:
Lexi Turgeon wrote:Why does it get printed like that when my invert method has the numerator and denominator being switched?
Junilu Lacar wrote:BTW, if you did it the object-oriented way, you wouldn't have to deal with all that swapping stuff:
Lexi Turgeon wrote:And I know the formatting and variable names are a bother, but I have to use them for my class in order to get a good grade.
Junilu Lacar wrote:
Lexi Turgeon wrote:And I know the formatting and variable names are a bother, but I have to use them for my class in order to get a good grade.
I find it hard to believe that the way you format your code, if what you post is a reflection of what you submit, is actually what it takes to get a good grade. If it were up to me, your formatting would be a deduction in points every time.
Lexi Turgeon wrote:And I know the ... variable names are a bother, but I have to use them for my class in order to get a good grade.
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|