subject

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);

}

}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Which one of the following would administrators use to connect to a remote server securely for administration? a. telnetb. secure file transfer protocol (sftp)c. secure copy (scp)d. secure shell (ssh)
Answers: 1
question
Computers and Technology, 21.06.2019 23:00
Explain briefly why you cannot expect to find a previous version of every file with which you work.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
You know the right answer?
Implement a function called merge that does the following in C#:

* Takes three sequence...
Questions
question
Mathematics, 29.09.2019 03:50
question
Chemistry, 29.09.2019 03:50
question
Physics, 29.09.2019 03:50
Questions on the website: 13722367