FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MiniJava-Compiler/test/src4 at main · ron-che-debugger/MiniJava-Compiler · GitHub
ron-che-debugger
/
MiniJava-Compiler
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MiniJava-Compiler
/
test
/
src4
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (41 loc) · 644 Bytes
Breadcrumbs
MiniJava-Compiler
/
test
/
src4
Copy path
File metadata and controls
41 lines (41 loc) · 644 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* ex4: Arrays */
program ex4;
class c4
{
declarations
int[] x=int[10];
int[] ia[]={3, 5, 7};
enddeclarations
method void main()
declarations
int[] y=int [25];
int z ;
enddeclarations
{
y[3] := 17;
z := y[3] + 3;
ia[2] := 27 ;
system.println('z=');
system.println(z);
system.println('ia[0]=');
system.println(ia[0]);
system.println('z=');
system.println(z);
system.println('ia[1]=');
system.println(ia[1]);
system.println('ia[2]=');
system.println(ia[2]);
z := -1;
while (z<2)
{
ia[z+1] := 1 + z*2 + z*z;
z:=z+1;
};
z := 0;
while (z<=2)
{
system.println(ia[z]);
z:=z+1;
};
}
}
Back
|
FazBrowse Home
|
New Git URL