1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Likurg_2 [28]
3 years ago
14

Write a function negateOdds that takes a list of integers and returns a list of integers with all of the odd integers negated. n

egateOdds :: [Integer] -> [Integer]
example: [1,2,3,4,5] should return [-1,2,-3,4,-5]
Computers and Technology
1 answer:
aleksley [76]3 years ago
5 0

Is this computer science?

If so, then the function you would need for your code is this...

_____

if (someValue%2 != 0) {

 value *= -1;

        }

_____

//basically <u>number%2 == 0</u> means even so "!" means false so "not even" meaning "odd."

Assuming you are doing an array list (given a set value) or a for-loop with an

int someValue = Integer.parseInt(args[i]); inside (not given a set value and not restricted)

Otherwise ignore me....lol

You might be interested in
What is a layer, in the context of this lesson?
pshichka [43]

Answer:

A logical unit of a system.

Explanation:

i'm thinking your are talking about system layers such as the ISO? Layers help identify the order of how the whole system works.

7 0
3 years ago
Read 2 more answers
A certain manager makes the following statement "Our internet company is in business for the money, making profits, and making t
julia-pushkina [17]

Answer:

d. Stockholder theory

Explanation:

The theory of maximising profits

8 0
3 years ago
Can someone help me plz
xxMikexx [17]

Answer:

ok but on what tho

Explanation:

plz explain yourself

8 0
3 years ago
Read 2 more answers
What the benefits of folder when working with files
sasho [114]
It helps to keep things organized
3 0
3 years ago
Read 2 more answers
What is the reason that friction is present in surface to surface contact?
Andrej [43]
One surface is larger than the other surface
3 0
3 years ago
Other questions:
  • whats something that u want to do but ur parents wont allow it like having a phone or going to a college ​
    11·2 answers
  • You need to immediately terminate process id 2129. which command should you use?
    15·1 answer
  • An operating system coordinates the BLANK of a computers operation.
    7·2 answers
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • Which of the following illustrates an example of a Boolean data type?
    15·1 answer
  • Give two separate print statements: one will print your name, the other will print your major. Ensure that both will print on th
    15·1 answer
  • The use of desktop computer equipment and software to create high-quality documents such as newsletters, business cards, letterh
    14·1 answer
  • When a program is adapted to run on multiple processors in a multiprocessor system, the execution time on each processor is comp
    10·1 answer
  • What is a good range for CPU usage to be considered running well?
    15·1 answer
  • Merging refers to dividing a single cell into multiple cells. *TrueFalse
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!