Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
29
Task/Boolean-values/S-BASIC/boolean-values.basic
Normal file
29
Task/Boolean-values/S-BASIC/boolean-values.basic
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
$constant true = 0FFFFH
|
||||
$constant false = 0
|
||||
|
||||
var a, another = char
|
||||
var b, adult, age = integer
|
||||
var c = real
|
||||
|
||||
repeat
|
||||
begin
|
||||
input "Applicant's age in years"; age
|
||||
adult = (age >= 18)
|
||||
if adult then
|
||||
print "Applicant has full access"
|
||||
else
|
||||
print "Applicant has restricted access"
|
||||
input "Do another (y/n)"; another
|
||||
end
|
||||
until not another
|
||||
|
||||
a = (2 > 3)
|
||||
b = (2 > 3)
|
||||
c = (2 > 3)
|
||||
print "2 > 3 as char: "; a
|
||||
print "2 > 3 as int : "; b
|
||||
print "not (2 > 3) : "; not b
|
||||
print "2 > 3 as real: "; c
|
||||
print "not (2 > 3) : "; not c
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue