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
The new season of AFL, and the excited coming FIFA World Cup in South Africa this June, many sports fans are willing to find the latest results of their beloved sports teams. In th

Give brief description about arithmetic processing unit To execute the arithmetic operations there is a separate section known as arithmetic processing unit in CPU. The arithme


How many lines of address bus must be used to access 2048 bytes of memory when available RAM chips 128 × 8.  How many lines of these will be common to each chip? Ans. AS chips

Q. What is the Concept of Lock? Locks are used for protected access of data in a shared variable system.  There are numerous kinds of locks:  1)  Binary Locks: These locks a

Ask questiPower and EnergyQuestion 4Consider a processor that runs at 2.5 GHz and 1 Volt. When running a given CPU-bound program,the processor consumes 100 W, of which 20 W is leak

DEscribe a console application to show all the arguments passed tocommand line whereas running the application. The user can pass anynumber of arguments that should be shown. Use l

Dictator Dim wants to replace counting, in particular, counting the population of his land. To keep an accurate population count, Dictator Dim has instructed his secretary to add o

How does TCP/IP decide the size of an IP fragment? Explain. TCP/IP protocol utilizes the name IP datagram to refer to an Internet packet. The amount of data carried into a data

PRAM is one among the models which are used for designing the parallel algorithm as shown in Figure. The PRAM model comprises the following components: i)  A group of identical