Question: Write a program that generates a vector with 2 0 random elements between - 1 0 and 1 0 and then finds: 1 . The

Write a program that generates a vector with 20 random elements between -10 and 10 and then
finds:
1. The sum of the positive elements.
2. The sum of the negative elements
3. Prove that the sum of the all elements = the sum of the positive elements + sum of the
negative elements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!