CodeUp | if~else 문제 1155

SeungMo·2021년 9월 2일
0

7의 배수일 경우 multiple를 출력하고, 7의 배수가 아니면 not multiple을 출력하시오.

a=int(input())

if a%7 == 0 :
  print("multiple")

else :
  print("not multiple")

a=int(input())

  • a에 정수를 입력

if a%7 == 0 :
print("multiple")

  • a를 7로 나눈 나머지가 0이면 7의 배수

else :
print("not multiple")

  • a를 7로 나눈 나머지가 0이 아니라면 7의 배수가 아님
profile
무작정 하루 한줄 코드

0개의 댓글

관련 채용 정보