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 happens when two computers use the same IP address?
mr Goodwill [35]

Answer:

Its B, "irregular signals sent over the network"

Explanation:

When you duplicate IP addresses don’t make one machine controllable but they rather just <em><u>break</u></em><u><em> network connectivity.</em></u>

<u><em /></u>

<u><em>HOPPPPE THIS HELPPPPPPPPPPPPSS</em></u>

7 0
3 years ago
There are three types of value for money. Which of the following is not a method of value?
AlladinOne [14]
The answer to this question is c
4 0
3 years ago
Question 1 (True/False Worth 15 points)
liraira [26]

It is a programmer's responsibility to contribute to society and human well-being is true.

Explanation:

  • It is a programmer's responsibility to contribute to society and human well-being is true.
  • The Association for Computing Machinery (ACM) is known as  the world's largest educational and scientific computing society.
  • It has its own Code of Ethics and another set of ethical principles which were also approved by the IEEE as the known standards of teaching and practicing software engineering.
  • Programmers contribute to develop computer systems which can reduce negative impression to the society.
  • The negativity includes as threats to safety and health, which can be reduced and make everyday activities and work easier.
  • software developers should reduce the risk of harming others due to the coding errors or the security issues which could impact human well-being.

3 0
3 years ago
What is returned by the code: range (5, 100, 25) ?
Nataly [62]
You would have to add them up need more info on the returned video
6 0
3 years ago
Read 2 more answers
What types of issues can you most likely resolve by knowing how to access and use the control Panel?
andrezito [222]
Network issues; screen resolution and volume issues
8 0
3 years ago
Other questions:
  • Why is it that even though there aren't the max number of answers on a question, (or sometimes even NO answers) When I click the
    11·1 answer
  • Provide the definition for each of the following structures and unions:
    8·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • You are given the task of reading in n numbers and then printing them out in sorted order. Suppose you have access to a balanced
    12·1 answer
  • What is the code for this please?​
    13·1 answer
  • How are comments in a Java program treated by the compiler?
    14·2 answers
  • Determine what is printed by the following code.
    8·1 answer
  • ...............is a personal computer that fits on desk.​
    5·2 answers
  • What is an automatic update and when should you use it
    10·1 answer
  • Question 12 (5 points)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!