(20%) Problem 4 Create a program that implements that alternates adding and subtracting numbers in a 2D array, starting

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

(20%) Problem 4 Create a program that implements that alternates adding and subtracting numbers in a 2D array, starting

Post by answerhappygod »

20 Problem 4 Create A Program That Implements That Alternates Adding And Subtracting Numbers In A 2d Array Starting 1
20 Problem 4 Create A Program That Implements That Alternates Adding And Subtracting Numbers In A 2d Array Starting 1 (55.33 KiB) Viewed 37 times
Example run:
Enter 16 numbers: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Output: 1 + 2 - 3 + 4 - 5 + 6 - 7 + 8 - 9 + 10 - 11 + 12 - 13 + 14 - 15 + 16 = 10
Enter 16 numbers: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 aInvalid input detected.
Enter 16 numbers: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 a
Invalid input detected.
(20%) Problem 4 Create a program that implements that alternates adding and subtracting numbers in a 2D array, starting with addition. The program should accept 16 values that are placed in a 4 x 4 array. Requirements • Create a 2D int array of size 4 x 4. . Read all integers from a user. • If an invalid input is given, warn the user and exit the program gracefully (do not use exit()). • Show the full equation and result.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply