-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REMOVE function counter, ADD comments
- Loading branch information
Showing
4 changed files
with
75 additions
and
12 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,58 @@ | ||
import java.io.InputStreamReader; | ||
import java.util.Scanner; | ||
public class Main { | ||
|
||
static class Person { | ||
public char gender; | ||
public int age; | ||
public float height; | ||
public Boolean isGay; | ||
public Person[] relatives; | ||
} | ||
|
||
static Scanner _reader = new Scanner(new InputStreamReader(System.in)); | ||
static Object[] _ret; | ||
|
||
public static int read() { | ||
return Integer.valueOf(_reader.nextLine()); | ||
} | ||
|
||
public static void main(String args[]) { | ||
main(); | ||
} | ||
|
||
static Object[] genPerson(int ammount) { | ||
Person[] p; | ||
int i; | ||
p = new Person[ammount]; | ||
i = 0; | ||
int _cond_0 = ammount; | ||
for(int _i_0 = 0; _i_0 < _cond_0; _i_0++) { | ||
p[i] = new Person(); | ||
i = i + 1; | ||
} | ||
return new Object[]{p}; | ||
} | ||
|
||
static Object[] foo() { | ||
return new Object[]{1, 4.2f, 'a'}; | ||
} | ||
|
||
static void main() { | ||
Person[] a; | ||
int x; | ||
float y; | ||
char z; | ||
int k; | ||
a = (Person[]) genPerson(10)[0]; | ||
a[0].age = 20; | ||
System.out.print(a); | ||
_ret = foo(); | ||
x = (int)_ret[0]; | ||
y = (float)_ret[1]; | ||
z = (char)_ret[2]; | ||
_ret = foo(); | ||
k = (int)_ret[0]; | ||
y = (float)_ret[1]; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* | ||
Maxwell Souza 201435009 | ||
Rodolpho Rossete 201435032 | ||
*/ | ||
|
||
package generator; | ||
|
||
import org.stringtemplate.v4.ST; | ||
|
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