Sunday, January 21, 2018

[Bioinformatics 101] 004. if else statement

Hello! This is Kenneth J Han!

In this post, we are going to look at if ... else statement.

004. IF ELSE Statement

Check whether the variable num1 is multiple of 3 or multiple of 7.
num1 ← 7

IF num1 % 3 == 0
    PRINT "Multiple of 3"
ELSE IF num % 7 == 0
    PRINT "Multiple of 7"
    PRINT "None of them"

Multiple of 7

If you have difficulties solving problem, visit the links below!
Your source code is on ready to serve!

Python source code answer on Github
Java source code answer on Github

See you on next post!

0 개의 λŒ“κΈ€:

Post a Comment