CJCoding With Joseph
15free / daySign inCreate account

A Vector struct (int x, y) is defined. Complete the function scale so it multiplies BOTH fields of the vector by a factor, modifying the original through a pointer. The main function reads a vector and a factor, calls scale, and prints the result.

Example: vector (2, 3) scaled by 4 becomes '8 12'.

Expected output

8 12

= newline. No newline after the last line.

Hints2 available
Topics
Structs
Auto-input
2 3 4\n
This input is automatically fed to your program's stdin
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.