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 is Race-around problem? How can you rectify this? The clock pulse which remains into the 1 state whereas both J and K are equal to 1 will reason the output to complement a

What is macro-expansion? Macro calls lead to macro expansion. Throughout macro expansion, the macro call statement is replaced through a sequence of assembly statements.

What is micro operation? A micro operation is an elementary operation performed with the data kept in registers.   1) Register transfer microoperation transfer binary inform

What is system testing? The final step in testing is system testing, which means checking the whole application. System testing exercises the overall application and make sure

A ring counter consisting of five Flip-Flops will have ? Ans. A ring counter have 5 states while consisting of Five Flip-Flops.

State about the Behavioral modeling Behavioral means how hardware behaves determine exact way it works we write using HDL syntax. For complex projects it's better mixed approac

Vector-Scalar Instructions In this category, when combination of vector and scalar are fetched and stored in vector register. These instructions are referred with the subsequen

What is Supply Chain Management? Supply Chain Management: Supply Chain Management includes developing the performance of an organization's supply chain from its suppliers to

What is the use of inter process communication. Inter process communication gives a mechanism to allow the co-operating process to communicate with each other and synchronies t

Q. Can a vector have a component equivalent to zero and still have a nonzero magnitude? Answer:- Yes For example the 2-dimensional vector (1, 0) has length sqrt (1+0) = 1