Skip to content

Files

Latest commit

9987a3c · Mar 6, 2018

History

History

062-n-mod-m

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 6, 2018
Mar 6, 2018
Mar 6, 2018
Mar 6, 2018

N Mod M

Challenge Description:

Given two integers N and M, calculate N Mod M (without using any inbuilt modulus operator).

Input sample:

Your program should accept as its first argument a path to a filename. Each line in this file contains two comma separated positive integers. E.g.

20,6
2,3

You may assume M will never be zero.

Output sample:

Print out the value of N Mod M