Question: Write a Java program that reads items of two vectors and applies the below given function over those vectors. f(x, y) = 2x +
Write a Java program that reads items of two vectors and applies the below given function over those vectors. f(x, y) = 2x + 3y Program should continue until user enters 0 for the size of the vectors. Analyze sample output and write your codes accordingly. Size of the vectors: 3 First vector (x): 2 5 10 Second vector (y): 1 3 1 Result: [7 19 23] Size of the vectors: 2 First vector (x): 20 Second vector (y): 1 5 Result: [7 15] Size of the vectors: 4 First vector (x): 2 50 4 Second vector (y): 6 1 3 5 Result: [22 13 9 23] Size of the vectors: 0 Bye!
Step by Step Solution
There are 3 Steps involved in it
Following code does the desired task import javautilScanner class CalVec public static void mainStr... View full answer
Get step-by-step solutions from verified subject matter experts
