강의

멘토링

커뮤니티

Inflearn Community Q&A

pompomyena's profile image
pompomyena

asked

Do it! Introduction to Java Programming with Eun Jong

Understanding Control Flow (2)

짝수 홀수 개념이 이해가 안가요 ㅠㅠ

Written on

·

507

0

(num%2)==1 

2로 나눴을 때 나머지가 1 

(num%2)==0 

2로 나눴을 때 나머지가 0

 

(num%2)==0 

나머지가 0이 되는게 짝수인가요 ? 

 

 

java

Answer 1

1

2, 4, 6, 8  짝수죠?

2로 나눠보세요

2 나누기 2 = 몫 1, 나머지 0

4 나누기 2 = 몫 2, 나머지 0

6 나누기 2 = 몫 3, 나머지 0

8 나누기 2 = 몫 4, 나머지 0

pompomyena's profile image
pompomyena

asked

Ask a question