Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'console';
|
||||
class Program {
|
||||
|
||||
private int fun(int $y) {
|
||||
@@ -13,12 +14,12 @@ class Program {
|
||||
int $y = 5;
|
||||
for(int $x = 0; $x < $y; $x++) {
|
||||
for($z = 0; $z <= ($y - $x - 2); $z++) {
|
||||
print(' ');
|
||||
Console::Print(' ');
|
||||
}
|
||||
for($z = 0; $z <= $x; $z++) {
|
||||
print($this->fun($x) / ($this->fun($z) * $this->fun($x - $z)), ' ');
|
||||
Console::Print(($this->fun($x) / ($this->fun($z) * $this->fun($x - $z))) + ' ');
|
||||
}
|
||||
print("\n");
|
||||
Console::Print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user