CJCoding With Joseph

Dot Product of Two Vectors

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:

11

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

Expected Output:

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