CJCoding With Joseph
15free / daySign inCreate account

Two vectors are given: a = {1, 2} and b = {3, 4}. The dot product is a.x*b.x + a.y*b.y. Compute and print it (see Expected Output).

That is 1*3 + 2*4 = 3 + 8 = 11. There is no trailing newline.

Expected output

11

= 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.