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
Brjrbtjr

Tool that is used to transfer data/files among computers on the Internet TCP (Transfer control protocol)

What is the difference between the following two lines of Verilog code? #5 a = b; a = #5 b; #5 a = b; Wait five time units before doing the action for "a = b;". Value assig

Q. What do you mean by Drive Cache? Disk cache may be a part of RAM sometimes known as soft disk cache which is used to speed up access time on a disk. In latest technologies s

The Peripheral interface chip system requires the construction of the interface chip circuit, which is controlled by main micro-controller via the user interface. I also need set

Ferroelectric RAM is a random-access memory same in construction to DRAM but uses a ferroelectric layer rather of a dielectric layer to achieve non-volatility. FeRAM is one of a gr

Can we create a gui status in a program from the object browser? Yes.  You can make a GUI STATUS in a program using SET PF-STATUS.

Loosely Coupled Systems These systems do not distribute the global memory because shared memory concept gives rise to the difficulty  of memory conflicts, which in turn slows d

How to send a report to the printer instead of displaying it on the screen? We can send a report to the printer instead of displaying it on the screen.  To do this, use the key

Coding advantages of casex or casez By using casex or casez has the following coding advantages: -  It reduces number of lines, especially if the number of bits had been m