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
ascii code add=2unit,replace=1unit,delete=3unit.convert ascii code in minimum cost

The desired daily output for an assembly line is 360 units. This assembly line will operate 450 minutes per day. The following table have information on this product's task times a

Explain the Design Procedure for Flip Flop? The design procedure as follows. 1) Acquire the clear description of the desired flip flop X. 2) Acquire the present state- next

The implementation of a (non-recursive) binary search of an array. The assumption is that a given array is sorted. We want to see if a particular value, that we'll call the target

Task: Sets and bags In mathematics, the notion of multiset (or bag) is a generalisation of the notion of set. A bag is a special kind of container in which the items may be

Explain the Executing Requests Using a Message-Passing Architecture Executing requests using a message-passing architecture requires good fundamental client-server programming

Define a Gate Fix ASIC-based design in short. Gate Fix ASIC-based design: A Gate Fix implies that a select number of gates and their interconnections may be subtracted or ad

What is the protocol used by SAP Gateway process? The SAP Gateway method communicates with the clients based on the TCP/IP Protocol.

What is C++ reference and JAVA final? Association ends must be bound at initialization and cannot be altered. C++ references can fully enforce these semantics, and the JAVA fin