CJCoding With Joseph

Reflect a Point Across the Origin

A struct Point starts at x = 3, y = -5. Reflect it across the origin by negating both fields, then print the new coordinates separated by a space:

-3 5

Modify the struct fields in place; do not just print -p.x without changing them. There is no trailing newline.

Expected Output:

-3 5
Topics:
Structs
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.