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
What are the events used for page headers and footers? The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.

Discuss the concept of segmentation? Segmentation is method for the non contiguous storage allocation. This is different from paging as this supports user's view of his program

Q. Show the process of message passing? The subsequent issues are determined by system in process of message passing: 1)  Whether receiver is prepared to receive message

The void type is used for  The void type is used to make generic pointers.

What is the use of isolated I/O configuration.  In isolated I/O configuration the CPU has distinct input and output instructions and each of these instructions is associated wi

What are the largest UDP messages that can fit into single Ethernet frame? UDP utilizes IP for delivery. As ICMP UDP packet is encapsulated in IP datagram. Therefore entire UDP

In a two-pass assembler, the task of the Pass II is to? Ans. The task of the Pass II is to synthesize the target program in a two-pass assembler.

The mercantile process model consists of which of the pahase(s): The pre-purchase phase. Purchase consummation phase. Post-purchase Interaction phase.

Draw the circuit diagram of Asynchronous decade counter and explain its working. Ans: To  design  a  circuit diagram of decade  asynchronous  counter  initially  we  dr

Simplified the Boolean Algebra (x + y)(x + z) simplifies to ? Ans. x + yz as simplified the Boolean Algebra expression. [(x + y) (x + z)] = xx + xz + xy + yz = x + xz + xy + y