Computers and Technology

Implement a function called merge that does the following in C#:

* Takes three sequences of numbers from 1 to 15

* Merge the list with members that adhere to the following requirements

* Any multiple of 3

* Is a member of all three lists

Explanation:

First get a list of multiples of three from all three lists (no repeats)

Then combine the list of threes with the intersection of all three lists (no repeats)

public class Problem2

{

public static IEnumerable merge(IEnumerable input1, IEnumerable input2, IEnumerable input3)

{

}

}

static void Main(string[] args)

{

Random rnd = new Random();

var list1 = Enumerable. Range(1,10).Select(i=>(rnd. Next()%15)+1);

var list2 = Enumerable. Range(1,10).Select(i=>(rnd. Next()%15)+1);

var list3 = Enumerable. Range(1,10).Select(i=>(rnd. Next()%15)+1);

var answer = Problem2.merge(list1,list2,list3);

foreach( int i in answer )

{

Console. WriteLine(i);

}

}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:50, williamsgregg5214
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer. b. don’t write your password down and leave it where others can find it. c. share your password with your friends. d.each time you visit a website, retain the cookies on your computer. e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, quintinlarrieu
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
image
Computers and Technology, 24.06.2019 17:50, yssbammy
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
Do you know the correct answer?
Implement a function called merge that does the following in C#:

* Takes three sequence...

Questions in other subjects:

Konu
Social Studies, 23.05.2020 01:06
Konu
Social Studies, 23.05.2020 01:06
Konu
Biology, 23.05.2020 01:06