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
BigorU [14]
3 years ago
7

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

Computers and Technology
1 answer:
levacccp [35]3 years ago
8 0

Answer:

Check the explanation

Explanation:

using System;

using System.Collections.Generic;

using System.Linq;

public class Problem2

{

public static IEnumerable<int> merge (IEnumerable<int> input1, IEnumerable<int> input2, IEnumerable<int> input3)

{

IList<int> list = new List<int>();

foreach (int i in input1)

{

if(i%3==0 && ! list.Contains(i))

list.Add(i);

}

foreach (int i in input2)

{

if(i%3==0 && ! list.Contains(i))

list.Add(i);

}

foreach (int i in input3)

{

if(i%3==0 && ! list.Contains(i))

list.Add(i);

}

return list;

}

}

public class Problem2Demo{

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

}

}

Kindly check the attached output image below.

You might be interested in
What are the three main purposes of an operating system? Explain how the old mainframe computers were different from the compute
lbvjy [14]

Answer:(1) To manage the computer's resources, which includes central processing unit, memory, disk drives, and printers, (2) To establish a user interface

(3)To execute and provide services for applications software.

The old mainframe computers have

(1) low memory sizes

(2) slower connectivity speed

(3) Larger sizer

(4) low sophistication.

Explanation: Operating system is a system software that manages the computer resources,helps to establish user interface and it helps to provide services for application softwares.

Operating system software includes WINDOWS X,WINDOWS 7,WINDOWS 8,LINUX,etc.

Mainframe computers are computers used by large multinational companies for processing bulk data. Old mainframe computers were produced by IBM(INTERNATIONAL BUSINESS MACHINE) in the year 1952 they are classed two scientific and commercial mainframe computers with different information although they had some incompatibilities. Old mainframe computers are large in size with low processing speed, sophistication and storage compared to present day system.

3 0
3 years ago
Which of the following would most likely be the target audience for a product
inna [77]

Answer:

B

Explanation:

They are saturday morning cartoons. Saturday morning cartoons are meant towards an audience of young children.

3 0
3 years ago
Read 2 more answers
When cleaning a computer, you need only worry about what you can see.
almond37 [142]

Answer:

False because the inside could be dirty and cause problems.

Explanation:

4 0
2 years ago
What is inputted into a computer system?
Anna [14]

Answer:

Hey mate.....

Explanation:

This is ur answer.....

<em>Input refers to any information, or data, that is sent to a computer for processing. Input is often sent to the computer from a device such as a keyboard, mouse, or other input device. Putting it simple, input is the act of entering data into a computer.</em>

<em />

Hope it helps!

Mark me brainliest....

FOLLOW ME!!!! :)

4 0
2 years ago
Which of these benefits can be achieved whensoftware is restructured?
Ivenika [448]

Answer:

iv. all of the given options

Explanation:

This is the correct answer because this is what happens when software is restructured.

<em>PLEASE</em><em> </em><em>DO MARK</em><em> </em><em>ME AS</em><em> </em><em>BRAINLIEST</em><em> </em><em>IF</em><em> </em><em>MY ANSWER</em><em> </em><em>IS HELPFUL</em><em> </em><em>;</em><em>)</em><em> </em>

4 0
3 years ago
Other questions:
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    10·2 answers
  • Someone is retiring next year. What would be an appropriate amount of risk to take their investments?
    8·2 answers
  • Create a class called Clock to represent a Clock. It should have three private instance variables: An int for the hours, an int
    15·1 answer
  • A powerpoint ________ is a set of unified design elements.
    5·1 answer
  • Why were mechanical calculators developed?
    8·2 answers
  • Discuss what they need to consider if they wish to use their devices when they are away from home?
    6·1 answer
  • Write a program that does the following:
    11·1 answer
  • Who are the four main antagonists in fnaf 1
    13·2 answers
  • A(n) __________ item is a hardware or software item that is to be modified and revised throughout its life cycle
    10·1 answer
  • Consider the code fragment below. Show the values stored at each location in memory and as they change while the code executes.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!