FSharp Program to compare two numbers
Written By:
Koushik S
Created at:
28-June-2023 20:36:19
Modified at:
28-June-2023 20:36:39
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())
if (a < b) then Console.WriteLine("First number is less than second\t")
if (a > b) then Console.WriteLine("First number is greater than second\t")
if (a = b) then Console.WriteLine("First number is equal to second\t")
Output 1
Enter the first number: 589
Enter the second number: 999
First number is less than second
Output 2
Enter the first number: 999
Enter the second number: 589
First number is greater than second
Output 3
Enter the first number: 589
Enter the second number: 589
First number is equal to second
There are no likes. Be the first one to like
Likes:
0
Comments:
0