LanceC93 / Principles-of-CS-II

0 stars 0 forks source link

if statements #2

Open crosshj opened 2 years ago

crosshj commented 2 years ago

https://github.com/LanceC93/Principles-of-CS-II/blob/2692a9f909baac4c46b7eff37a8130c467c01a11/HW_2/IncomeTax.java#L28

if (first thing is true){
  // first thing must be true
} else if( other thing is true) {
  // ^^^ no need to test for first thing being false in this condition
}
crosshj commented 2 years ago

correct me if I am wrong

LanceC93 commented 2 years ago

I think you are right. I also didn’t put a less than or equal, so the values on the margin don’t calculate correctly.

On Wed, Sep 8, 2021 at 2:36 PM crosshj @.***> wrote:

correct me if I am wrong

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LanceC93/Principles-of-CS-II/issues/2#issuecomment-915476811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCRMDWFQBGFOHIWDSSOSJ3UA6UMJANCNFSM5DVOGCRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.