Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -0,0 +1,9 @@
|
|||
Function Compare(a, b)
|
||||
IF a < b
|
||||
? "A is less than B"
|
||||
ELSEIF a > b
|
||||
? "A is more than B"
|
||||
ELSE
|
||||
? "A equals B"
|
||||
ENDIF
|
||||
Return Nil
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import std.stdio, std.conv, std.string;
|
||||
|
||||
void main() {
|
||||
import std.stdio, std.conv, std.string;
|
||||
|
||||
int a = 10, b = 20;
|
||||
try {
|
||||
a = to!int(readln().strip());
|
||||
b = to!int(readln().strip());
|
||||
a = readln.strip.to!int;
|
||||
b = readln.strip.to!int;
|
||||
} catch (StdioException) {}
|
||||
|
||||
if (a < b)
|
||||
|
|
|
|||
22
Task/Integer-comparison/RPG/integer-comparison.rpg
Normal file
22
Task/Integer-comparison/RPG/integer-comparison.rpg
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
h dftactgrp(*no)
|
||||
|
||||
d pi
|
||||
d integer1 10i 0
|
||||
d integer2 10i 0
|
||||
|
||||
d message s 50a
|
||||
|
||||
if integer1 < integer2;
|
||||
message = 'Integer 1 is less than integer 2';
|
||||
endif;
|
||||
|
||||
if integer1 > integer2;
|
||||
message = 'Integer 1 is greater than integer 2';
|
||||
endif;
|
||||
|
||||
if integer1 = integer2;
|
||||
message = 'Integer 1 is equal to integer 2';
|
||||
endif;
|
||||
|
||||
dsply message;
|
||||
*inlr = *on;
|
||||
Loading…
Add table
Add a link
Reference in a new issue