forked from KevinDuarte/COP3402-Module-3
-
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.
all that is needed to do is format the output and turn it in. I will do that within a couple of hours.
- Loading branch information
1 parent
4a22af4
commit f7150c3
Showing
7 changed files
with
110 additions
and
101 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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
var x, y; | ||
const m = 1; | ||
var a, b; | ||
begin | ||
y := 3; /* This is a comment */ | ||
x := y + 56; | ||
a := 4 + m; /*5*/ | ||
b := a + 2; /*7*/ | ||
a := a * b; /*35*/ | ||
while b < a do | ||
begin | ||
if odd b then | ||
b := b + 4; | ||
end /*not sure if the while end needs a '.' */ | ||
end. |
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
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
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,5 @@ | ||
//TEAM | ||
//First team member name: Kevin Duarte | ||
//Second team member name: Nestor Maysonet | ||
|
||
//How to compile and run: |
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,43 @@ | ||
//Test for while | ||
|
||
var a; | ||
begin | ||
while a < 20 do | ||
a := a + 1; | ||
end. | ||
|
||
//Test for if | ||
var a, b; | ||
begin | ||
a := 1; | ||
b := 2; | ||
if a > 2 then | ||
b := a; | ||
end. | ||
|
||
//addition with vars | ||
|
||
var a, b; | ||
begin | ||
a := 1; | ||
b := 1; | ||
a := b + 1; /* a = 2 */ | ||
a := a + 1; /* a = 3 */ | ||
b := a + 1; /* b = 4 */ | ||
a := b + 1; /* a = 5 */ | ||
end. | ||
|
||
//something more complicated | ||
|
||
const m = 1; | ||
var a, b; | ||
begin | ||
a := 4 + m; /*5*/ | ||
b := a + 2; /*6*/ | ||
a := a * b; /*30*/ | ||
while b < a do | ||
begin | ||
if odd b then | ||
b := b + 4; | ||
end /*not sure if the while end needs a '.' */ | ||
end. |
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
Oops, something went wrong.