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
mamaluj [8]
3 years ago
12

Implement a function called myFilter that does the following: Takes a sequence of integers with values from 0 to 100 Remove all

multiples of 6 less than 42 Then square each number Finally, remove any resulting integer that is odd public class Problem2 { public static IEnumerable myFilter(IEnumerable input) { } } static void Main(string[] args)
Engineering
1 answer:
goldenfox [79]3 years ago
6 0

Answer:

using System;

using System.Collections.Generic;

using System.Linq;

public class Problem1 {

public static IEnumerable < int > myFilter(IEnumerable < int > input) {

return input.Where((val, index) => {

//First remove all multiples of 6 less than 42

return !(val % 6 == 0 && val < 42);

}).Select((val, index) => {

//Then square each number

return val * val;

}).Where((val, index) => {

// Finally, remove any resulting integer that is odd

return !(val % 1 == 0);

});

}

public static void Main(string[] args) {

Random rnd = new Random(5);

//Takes a sequence of integers with values from 0 to 100

var listForProblem = Enumerable.Range(1, 100).Select(i => rnd.Next() % 101);

var answer = Problem1.myFilter(listForProblem);

foreach(int i in answer) {

Console.WriteLine(i);

}

}

}

Explanation:

The Problem 1 solution is explanatory enough.

Your problem 2 question is lacking details. However, i have written a code that sorts it.

You might be interested in
Water exerts little pressure on a building so it has no implications on foundation design.
777dan777 [17]

Fact

Explanation:

<em>If </em><em>wrong </em><em>Im </em><em>sorry </em><em>Correct </em><em>me </em><em>In </em><em>The</em><em> </em><em>c</em><em>om</em><em>m</em><em>ent </em><em>please </em>

7 0
3 years ago
Lobbyists are hired by companies to influence legislation to meet a company's goals. They ask for things needed to program plans
denis-greek [22]
Social media groups. So c
8 0
3 years ago
Read 2 more answers
What are the 2 main sources of data
hjlf

Following are the two sources of data:

  • Internal Source. When data are collected from reports and records of the organisation itself, it is known as the internal source. ...
  • External Source. When data are collected from outside the organisation, it is known as the external source.

IamSugarBee

3 0
3 years ago
Read 2 more answers
In an analog addressable system, the determination of the alarm state is performed by the _____?
Nostrana [21]

Answer:

Control panel

Explanation:

The Control Panel is a component of Microsoft Windows which provides the ability to view and change system settings. It consists of a set simple computer programs (applets) that include adding or removing hardware and software, controlling user accounts, changing accessibility options, and accessing networking settings.

6 0
3 years ago
Cisco what three best practices can help defend against social engineering attacks?
SOVA2 [1]

The three best practices that can help defend against social engineering attacks are:

  • Do not provide password resets in a c.ha.t window.
  • Resist the urge to click on enticing web links.
  • Educate employees regarding policies.

<h3>What is Social Engineering?</h3>

This refers to the art of manipulation of people through social interactions with the aim of getting access to sensitive information that gives unauthorized access.

Hence, we can see that some of the best practices that can be used to defend against social engineering include not clicking on suspicious links, educating people about the dangers, etc.

Read more about social engineering here:

brainly.com/question/26072214

#SPJ12

4 0
2 years ago
Other questions:
  • Water flows through a horizontal plastic pipe with a diameter of 0.15 m at a velocity of 15 cm/s. Determine the pressure drop pe
    11·1 answer
  • I don't understand this I am really bad at measurements
    12·2 answers
  • Determine the direct runoff and streamflow given the following unit hydrograph. The rainfall is collected at 4-hour intervals an
    14·1 answer
  • How does a catapult incorporate technology?
    11·1 answer
  • By efficiency, we generally mean the ratio of the desired output to the required input. That is, efficiency is a measure of what
    7·1 answer
  • Air in a 10 ft3 cylinder is initially at a pressure of 10 atm and a temperature of 330 K. The cylinder is to be emptied by openi
    10·2 answers
  • Tests reveal that a normal driver takes about 0.75 s before he orshecan react to a situation to avoid a collision. It takes abou
    11·1 answer
  • If he wants to keep the height the same, what could the other dimensions be for him to get the volume he wants?
    5·1 answer
  • It is better to know or not to know?​
    6·2 answers
  • Please look at the picture for question.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!