Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Integer-comparison/VBScript/integer-comparison.vb
Normal file
27
Task/Integer-comparison/VBScript/integer-comparison.vb
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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."
|
||||
Loading…
Add table
Add a link
Reference in a new issue