Write a program using linq to find the sum of first 5 prime , Computer Engineering

Class Program

{

static void Main()

{

int[] MyPrimeNumbers = {1,2,3,5,7};

// Use the Count() and Sum() Standard Query Operators to

// compute the count an whole sum simultaeneously

Concole.WriteLine("The sum of first {0} prime number is {1}",

MyPrimeNumbers.Count(), MyPrimeNumbers.Sum());

}

}

 

 

Posted Date: 4/3/2013 2:34:38 AM | Location : United States







Related Discussions:- Write a program using linq to find the sum of first 5 prime , Assignment Help, Ask Question on Write a program using linq to find the sum of first 5 prime , Get Answer, Expert's Help, Write a program using linq to find the sum of first 5 prime Discussions

Write discussion on Write a program using linq to find the sum of first 5 prime
Your posts are moderated
Related Questions
Define parity generator During transmission, at sending end the message is applied to a parity generator, where the needed bit is formed.

Zero address instruction.  It is also possible to use instruction where the location s of all operand is explained implicitly. This operand of the use of the method for storing

Design a 4-bit comparator using combinational logic, and Karnaugh Maps. The inputs of the circuit are two 2-bit numbers. a) Construct the truth table given 2-bits inputs A and B, a

Q. Physical characteristics and access mode of disk drive? Access Time: Access time is time needed between requests made for a read or write operation until the time data are

International Coal Coal-fired Power Generation Compared with other fossil fuels, burning coal produces relatively large amounts of atmospheric pollutants: carbon dioxide

Q. Basic Tradeoff of concerns for instruction set design? Basic Tradeoff: Smaller instruction (less space) vs. desire for more powerful instruction repertoire. Generally p

What is .NET / .NET Framework?  It is a Framework in which Windows applications might be developed and run. The Microsoft .NET Framework is a platform for building, deploying,

Explain the Communications of Request/Response Communications requirements for message or procedural- based interaction are very similar. Application interaction (client-server

The statement of Gustafson's law can be described with the help of an illustration. Let us take a problem, say P, which has to be solved using a parallel computer. Let Ts be the ti

Can math operations be performed on a void pointer? No. Pointer addition and subtraction are based on advancing the pointer by a number of elements. By explanation, if you have