F# program to find Modulus of two numbers
Program
open System
Console.Write("Enter the first number:\t")
let a = Int32.Parse(Console.ReadLine())
Console.Write("Enter the second number:\t")
let b = Int32.Parse(Console.ReadLine())
let modulo =
if b <> 0 then
let m = a % b
Console.WriteLine("Modulus of two numbers is:\t{0}" ,m)
else
Console.WriteLine("Second Number cannot be Zero")
Output 1
Enter the first number: 44
Enter the second number: 4
Modulus of two numbers is: 0
Output 2
Enter the first number: 99
Enter the second number: 0
Second Number cannot be Zero
Output 3
Enter the first number: 1
Enter the second number: 5
Modulus of two numbers is: 1
Output 4
Enter the first number: 76
Enter the second number: 1
Modulus of two numbers is: 0