Question: Write a program that prints a new array composed from the opposite of each element in this array. N.B: The opposite of a positive
Write a program that prints a new array composed from the opposite of each element in this array. N.B: The opposite of a positive number is its negative value, and the opposite of a negative number is its positive value. Sample run: Enter the elements for the array until the entered number is 0: -32 45 -1.25 -8 0 The new array is 32 -45 1.2 -5 8
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
Function to create a new array with opposite elements def oppositearrayinputa... View full answer
Get step-by-step solutions from verified subject matter experts
