-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luís Möllmann
committed
May 11, 2017
1 parent
0d37c7f
commit 12a46c1
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// UFRGS - Compiladores - Marcelo Johann - 2017/1 | ||
|
||
a: short 0; | ||
i: long 0; | ||
v: long[10] 0 0 0 0 0 0 0 0 0 0; | ||
mat: long[10]; | ||
f: float 10.55; | ||
c: byte 'x'; | ||
d: byte 65; | ||
|
||
|
||
long main() | ||
{ | ||
a = 10; | ||
v#2 = v[10-1]; | ||
for (i = 1 to 10) | ||
print i " "; | ||
|
||
print " Digite um numero: \n"; | ||
read i; | ||
while (i<10) | ||
{ | ||
a = incn(a,1); | ||
i = i + 1; | ||
a = (i + a + 1); | ||
}; | ||
print "Incrementado algumas vezes fica " a "\n"; | ||
when (a==5) then | ||
print "Parou no meio\n"; | ||
when (a==11) then | ||
; | ||
when (a==11) then else | ||
; | ||
;;; | ||
{;}; | ||
{}; | ||
}; | ||
|
||
long incn (long x, long n) | ||
return x+n; | ||
|
||
short voidfunc() ; | ||
|
||
|
||
|