Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,14 +0,0 @@
begin
integer a, b;
write( "first number: " );
read( a );
write( "second number: " );
read( b );
if a < b then write( a, " is less than ", b );
if a = b then write( a, " is equal to ", b );
if a > b then write( a, " is greater than ", b );
end.

View file

@ -1,24 +0,0 @@
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;
procedure Compare_Ints is
A, B : Integer;
begin
Get(Item => A);
Get(Item => B);
-- Test for equality
if A = B then
Put_Line("A equals B");
end if;
-- Test For Less Than
if A < B then
Put_Line("A is less than B");
end if;
-- Test For Greater Than
if A > B then
Put_Line("A is greater than B");
end if;
end Compare_Ints;

View file

@ -1,26 +0,0 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. Int-Compare.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC 9(10).
01 B PIC 9(10).
PROCEDURE DIVISION.
DISPLAY "First number: " WITH NO ADVANCING
ACCEPT A
DISPLAY "Second number: " WITH NO ADVANCING
ACCEPT B
* *> Note: Longer verbal forms may be used instead of symbols
* *> e.g. 'IS GREATER THAN' instead '<'
IF A < B
DISPLAY A " is less than " B
ELSE IF A = B
DISPLAY A " is equal to " B
ELSE IF A > B
DISPLAY A " is larger than " B
END-IF.
GOBACK
.

View file

@ -1,16 +1,16 @@
import extensions;
public program()
public Program()
{
var a := console.readLine().toInt();
var b := console.readLine().toInt();
var a := Console.readLine().toInt();
var b := Console.readLine().toInt();
if (a < b)
{ console.printLine(a," is less than ",b) };
{ Console.printLine(a," is less than ",b) };
if (a == b)
{ console.printLine(a," equals ",b) };
{ Console.printLine(a," equals ",b) };
if (a > b)
{ console.printLine(a," is greater than ",b) }
{ Console.printLine(a," is greater than ",b) }
}

View file

@ -1,7 +0,0 @@
(defun integer-comparison (a b)
"Compare A to B and print the outcome in the message buffer."
(interactive "nFirst integer ⇒\nnSecond integer ⇒")
(cond
((< a b) (message "%d is less than %d." a b))
((> a b) (message "%d is greater than %d." a b))
((= a b) (message "%d is equal to %d." a b))))

View file

@ -1,15 +0,0 @@
include get.e
integer a,b
a = floor(prompt_number("a = ",{}))
b = floor(prompt_number("b = ",{}))
puts(1,"a is ")
if a < b then
puts(1,"less then")
elsif a = b then
puts(1,"equal to")
elsif a > b then
puts(1,"grater then")
end if
puts(1," b")

View file

@ -1,10 +0,0 @@
$a = [int] (Read-Host a)
$b = [int] (Read-Host b)
if ($a -lt $b) {
Write-Host $a is less than $b`.
} elseif ($a -eq $b) {
Write-Host $a is equal to $b`.
} elseif ($a -gt $b) {
Write-Host $a is greater than $b`.
}

View file

@ -1,13 +0,0 @@
REBOL [
Title: "Comparing Two Integers"
URL: http://rosettacode.org/wiki/Comparing_two_integers
]
a: ask "First integer? " b: ask "Second integer? "
relation: [
a < b "less than"
a = b "equal to"
a > b "greater than"
]
print [a "is" case relation b]

View file

@ -1,11 +0,0 @@
let my_compare = (a, b) => {
if a < b { "A is less than B" } else
if a > b { "A is greater than B" } else
if a == b { "A equals B" }
else { "cannot compare NANs" }
}
let a = int_of_string(Sys.argv[2])
let b = int_of_string(Sys.argv[3])
Js.log(my_compare(a, b))

View file

@ -1,27 +0,0 @@
option explicit
function eef( b, r1, r2 )
if b then
eef = r1
else
eef = r2
end if
end function
dim a, b
wscript.stdout.write "First integer: "
a = cint(wscript.stdin.readline) 'force to integer
wscript.stdout.write "Second integer: "
b = cint(wscript.stdin.readline) 'force to integer
wscript.stdout.write "First integer is "
if a < b then wscript.stdout.write "less than "
if a = b then wscript.stdout.write "equal to "
if a > b then wscript.stdout.write "greater than "
wscript.echo "Second integer."
wscript.stdout.write "First integer is " & _
eef( a < b, "less than ", _
eef( a = b, "equal to ", _
eef( a > b, "greater than ", vbnullstring ) ) ) & "Second integer."