6.18 LAB: Sum of products Write a program that reads two lists of integers from input into two arrays and outputs the su

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

6.18 LAB: Sum of products Write a program that reads two lists of integers from input into two arrays and outputs the su

Post by answerhappygod »

6.18 LAB: Sum of products
Write a program that reads two lists of integers from input intotwo arrays and outputs the sum of multiplying the correspondinglist items. The program first reads an integer representing thelength of each list, followed by two lists of integers.
Ex: If the input is:
the program calculates (1 * 3) + (2 * 2) + (3 * 1) andoutputs
Ex: If the input is:
the program calculates (2 * 1) + (3 * 1) + (4 * 1) + (5 * 1) andoutputs
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply