Created
January 12, 2019 05:59
-
-
Save dongjinahn/cdc72d48e89c02db2dd93f1f0c753cab to your computer and use it in GitHub Desktop.
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
i = 0; | |
t3 = 0; | |
while (i < m) { | |
j = 0; | |
t2 = t3; | |
while (j < n) { | |
t1 = t3 + j; // Changed | |
temp = Base(a) + t1; | |
*(temp) = *(Base(b) + t1) + *(Base(c) + t1); | |
j += 1; | |
} | |
i += 1; | |
t3 += n; | |
} |
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
i = 0; | |
while (i < m) { | |
j = 0; | |
while (j < n) { | |
temp = Base(a) + i * n + j; | |
*(temp) = *(Base(b) + i * n + j) + *(Base(c) + i * n + j); | |
j += 1; | |
} | |
i += 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
i = 0; | |
while (i < m) { | |
j = 0; | |
while (j < n) { | |
t1 = i * n + j; // Changed | |
temp = Base(a) + t1; // Changed | |
*(temp) = *(Base(b) + t1) + *(Base(c) + t1); // Changed | |
j += 1; | |
} | |
i += 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
i = 0; | |
while (i < m) { | |
j = 0; | |
t2 = i * n; // Changed | |
while (j < n) { | |
t1 = t2 + j; // Changed | |
temp = Base(a) + t1; | |
*(temp) = *(Base(b) + t1) + *(Base(c) + t1); | |
j += 1; | |
} | |
i += 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
class Point { | |
public: | |
int x, y; | |
void move(int x, int y) { ... } | |
virtual void draw() { ... } | |
} | |
class ColorPoint: public Point { | |
public: | |
int color; | |
void draw() { ... } | |
void setColor(int c) { ... } | |
} | |
Point p = new ColorPoint(); | |
p.move(3, 5); // A | |
p.draw(); // B |
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
private static int[] data = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
public static void t(int i, int x) { | |
if (i < 5) data[i] = i * x; | |
else data[i] = -x; | |
} | |
public static void main() { | |
int x = 100; | |
t(1, x); // A | |
t(5, x); // B | |
int y = getFromUserSomehow(); | |
t(y, x); // C | |
} |
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
public static void t_1(int x) { | |
data[1] = x; | |
} | |
public static void t_5(int x) { | |
data[5] = -x; | |
} |
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
i = 0; | |
t3 = 0; // Changed | |
while (i < m) { | |
j = 0; | |
t2 = t3; // Changed | |
while (j < n) { | |
t1 = t2 + j; | |
temp = Base(a) + t1; | |
*(temp) = *(Base(b) + t1) + *(Base(c) + t1); | |
j += 1; | |
} | |
i += 1; | |
t3 += n; // Changed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment