Hi, I am in a beginning C++ class in college and I need some help with building a programm. So basically i need to design a program, that changes elements of an array.
Task condition: User inputs an array (int type) a(1), a(2), , a(n). Obtain new array, changing all a(i) elements with 1, if | a(i) | =max(a(1), a(2), , a(n)), otherwise - with 0.
Where | a(i) | is modulus.
So i do not understand correctly what to do with that modulus, and also, do i need to change the element to 1, if it is the biggest element in array? (for example, if array is 4, -6, 8, 0 by changig the values we get 0,0,1,0 ?? Please, help me :((
I know how to create an array and how to change array elements with 1's and 0's, but in this case, i do not really understand this line: | a(i) | =max(a(1), a(2), , a(n))