CJCoding With Joseph
15free / daySign inCreate account

Midpoint of Two Points

Two points are given: a = {2, 4} and b = {6, 8}. Compute the midpoint by averaging the x-coordinates and the y-coordinates, then print them separated by a space (see Expected Output).

The sums here are even, so integer division gives exact results. There is no trailing newline.

Expected Output:

4 6

= newline. No newline after the last line.

Hints2 available
Topics:
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.