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 the mass of a cookbook
tatiyna

Answer:

it varies on the size of the cookbook

Explanation:

6 0
3 years ago
Why do computers use binary code?
Anna71 [15]

Answer:

To make sense of complicated data, your computer has to encode it in binary. Binary is a base 2 number system. Base 2 means there are only two digits—1 and 0—which correspond to the on and off states your computer can understand

4 0
3 years ago
Read 2 more answers
Flash drive / USB is ___________ device. A)Input B)Output C)Internal D)None of these
svetlana [45]

Explanation:

USB is a output devices

7 0
2 years ago
-1
N76 [4]

Answer:A flowchart is a diagram that depicts the steps involved in solving a problem. The following flowchart shows how to output the multiplication table ( n * 1 to m * 1) of a number, n and m:

3 0
3 years ago
Which of the following is true about operating system.
zalisa [80]

Answer:

google kis kam ka hai us se puch lo

7 0
3 years ago
Other questions:
  • Which of the following is an important initial step in designing an interface
    7·1 answer
  • 10 facts about turbines
    11·2 answers
  • The protocol that enables computers on the Internet to communicate with one another is called _____.
    10·2 answers
  • What takes information entered into a given system and sends it automatically to all upstream systems and processes?
    6·2 answers
  • Is it possible to make teleportation with a fusion device
    15·1 answer
  • Assuming there are 100 million households in the US, and that each household has two HDTVs, and that each TV is used to watch 4
    15·1 answer
  • In which table is the input and the corresponding output of a Boolean function listed? How is the output of the NAND gate determ
    9·1 answer
  • PLEASE HELP, Answer Correctly..Will give a bunch of brainlist points ​
    10·1 answer
  • Amogus :0) owo have a good day y'all
    12·1 answer
  • Describe the method used by operating systems to differentiate between TCP connections.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!