first commit
This commit is contained in:
commit
063194f8be
349 changed files with 36508 additions and 0 deletions
26
tester/testsuite/good/core012.jl
Normal file
26
tester/testsuite/good/core012.jl
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Test arithmetic and comparisons. */
|
||||
|
||||
int main() {
|
||||
int x = 56;
|
||||
int y = -23;
|
||||
printInt(x+y);
|
||||
printInt(x-y);
|
||||
printInt(x*y);
|
||||
printInt(45/2);
|
||||
printInt(78%3);
|
||||
double z = -9.3;
|
||||
double w = 5.1;
|
||||
printBool(z+w > z-w);
|
||||
printBool(z/w <= z*w);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void printBool(boolean b) {
|
||||
if (b) {
|
||||
printString("true");
|
||||
return;
|
||||
} else {
|
||||
printString("false");
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue