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
Consider a space shuttle weighing 100 kN. It is travelling at 310 m/s for 30 minutes. At the same time, it descends 2200 m. Cons
mixas84 [53]

Answer:

work done = 48.88 × 10^{9} J

Explanation:

given data

mass = 100 kN

velocity =  310 m/s

time = 30 min = 1800 s

drag force = 12 kN

descends = 2200 m

to find out

work done by the shuttle engine

solution

we know that work done here is

work done = accelerating work - drag work - descending work

put here all value

work done = ( mass ×velocity ×time  - force ×velocity ×time  - mass ×descends )  10³ J

work done = ( 100 × 310 × 1800  - 12×310 ×1800  - 100 × 2200 )  10³ J

work done = 48.88 × 10^{9} J

6 0
3 years ago
When passing another vehicle, when is it acceptable to drive over the
miss Akunina [59]

Answer:

Under no circumstances

Explanation:

I'm not 100% sure why, but I remember hearing that you're not suposed to go over the speed limit no matter what

7 0
3 years ago
Read 2 more answers
Information or signals entered into a computer system is
Virty [35]

<em>Logs.</em>

<em>Like data logs. Sometimes people make these logs to keep tabs on other people or to get important information put down somewhere that way it is saved and can be looked back upon later. Anytime someone makes an action on the computer, it makes a TMP file representing a log of what you want it to do before the computer quickly get's rid of the file.</em>

<em>-Ɽ3₮Ɽ0 Ⱬ3Ɽ0</em>

<em />

8 0
3 years ago
Only answer this if your name is riley
Sati [7]

Answer:

hey im like kinda riley

Explanation:

y u wanna talk to moi

3 0
3 years ago
Read 2 more answers
Q5
Klio2033 [76]

The C++ code that would draw all the iterations in the selection sort process on the array is given below:

<h3>C++ Code</h3>

#include <stdio.h>

#include <stdlib.h>

int main() {

   int i, temp1, temp2;

   int string2[16] = { 0, 4, 2, 5, 1, 5, 6, 2, 6, 89, 21, 32, 31, 5, 32, 12 };

   _Bool check = 1;

   while (check) {

       temp1 = string2[i];

       temp2 = string2[i + 1];

       if (temp1 < temp2) {

           string2[i + 1] = temp1;

           string2[i] = temp2;

           i = 0;

       } else {

           i++;

           if (i = 15) {

               check = !check;

           }

       }

   }

   

   return 0;

}

Read more about C++ programming here:

brainly.com/question/20339175

#SPJ1

5 0
1 year ago
Other questions:
  • System grounding on a power system means electrically connecting the __?__ of every wye-connected transformer or generator to ea
    12·1 answer
  • ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    9·1 answer
  • Consider laminar, fully developed flow in a channel of constant surface temperature Ts. For a given mass flow rate and channel l
    15·1 answer
  • The manufacturer of a 1.5 V D flashlight battery says that the battery will deliver 9 mA for 40 continuous hours. During that ti
    11·1 answer
  • 2.31 LAB: Simple statistics Part 1 Given 4 integers, output their product and their average, using integer arithmetic. Ex: If th
    5·2 answers
  • Shear modulus is analogous to what material property that is determined in tensile testing? (a)- Percent reduction of area (b) Y
    11·1 answer
  • Do you think the industrial revolution helped or hurt workers? Why?
    8·1 answer
  • Technician A says that the distributor cap provides a connection point between the rotor and each individual cylinder plug wire.
    10·1 answer
  • Which type of Artificial Intelligence (AI) can repeatedly perform tasks of limited scope?
    12·1 answer
  • A +7.5% grade meets a horizontal grade on a section of a rural mountainous highway. If the length of the crest vertical curve fo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!