CJCoding With Joseph

Add Two Complex Numbers

A struct Complex has integer fields re (real part) and im (imaginary part). Add a = {3, 2} and b = {1, 4} component-wise and print the result in the form re+imi:

4+6i

Use the format string "%d+%di". There is no trailing newline.

Expected Output:

4+6i
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.