27 lines
326 B
Plaintext
27 lines
326 B
Plaintext
struct Point {
|
|
int x;
|
|
int y;
|
|
};
|
|
|
|
int sum_array(int[] arr) {
|
|
int total = 0;
|
|
foreach (int n in arr) {
|
|
total = total + n;
|
|
}
|
|
return total;
|
|
}
|
|
|
|
int main() {
|
|
struct Point p;
|
|
int[] nums;
|
|
int x = 1 + 2 * 3;
|
|
p.x = x;
|
|
if (x > 0) {
|
|
x = x + p.x;
|
|
} else {
|
|
x = 0;
|
|
}
|
|
x = sum_array(nums);
|
|
return x;
|
|
}
|