Scale a Vector Struct
hardQuestion 148A 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
Sign in to use hintsTopics
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.