Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution by Phan Dinh The #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phandinhthe
Copy link

Please review for me.
Thanks.

int additionFor5 = 0;
int selectedAddition = 1;

for(int i=1; i<101;) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing around operators = <

if (i%5 == 0)
System.out.println("Buzz");

additionFor3 = 3-(i%3);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing around operators & parentheses - % ()

additionFor3 = 3-(i%3);
additionFor5 = 5-(i%5);

selectedAddition = additionFor3 > additionFor5 ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, this looks like a smart solution that jumps to the nearest multiple of 3 or 5.

Copy link
Member

@vietlq vietlq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting solution

@vietlq
Copy link
Member

vietlq commented Nov 6, 2016

Also I as shown in the videos, please use a separate branch weekX for each week to avoid problem with merging. Your master should be up-to-date with my master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants