June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,5 +1,5 @@
|
|||
let a = scan('Enter value of a: ')
|
||||
let b = scan('Enter value of b: ')
|
||||
let a = input('Enter value of a: ')
|
||||
let b = input('Enter value of b: ')
|
||||
|
||||
if a < b:
|
||||
print 'a is less than b'
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
myCompare :: Integer -> Integer -> String
|
||||
myCompare a b
|
||||
| a < b = "A is less than B"
|
||||
| a > b = "A is greater than B"
|
||||
| a == b = "A equals B"
|
||||
|
||||
main = do
|
||||
a' <- getLine
|
||||
b' <- getLine
|
||||
let { a :: Integer; a = read a' }
|
||||
let { b :: Integer; b = read b' }
|
||||
a <- readLn
|
||||
b <- readLn
|
||||
putStrLn $ myCompare a b
|
||||
|
|
|
|||
12
Task/Integer-comparison/HolyC/integer-comparison.holyc
Normal file
12
Task/Integer-comparison/HolyC/integer-comparison.holyc
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
I64 *a, *b;
|
||||
a = Str2I64(GetStr("Enter your first number: "));
|
||||
b = Str2I64(GetStr("Enter your second number: "));
|
||||
|
||||
if (a < b)
|
||||
Print("%d is less than %d\n", a, b);
|
||||
|
||||
if (a == b)
|
||||
Print("%d is equal to %d\n", a, b);
|
||||
|
||||
if (a > b)
|
||||
Print("%d is greater than %d\n", a, b);
|
||||
Loading…
Add table
Add a link
Reference in a new issue