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
How to calculate the flowchart

Question: (a) (i) Briefly define the term "Isotype". (ii) With the help of diagrams, describe the rules of "Isotype". (b) Elaborate on your understanding of internationa

What is Reflection?  It extends the benefits of metadata by permitting developers to inspect and use it at runtime. For example, dynamically verify all the classes contained in

Solve the equation 23.6 10 = X 2 for X Ans. 23.6 10 = X 2 So as to find X, firstly convert the Decimal number 23.610 in its Binary form. After that take the decimal inte

Difference between Paperbase and computer base system?

Learning Abilities of Perceptrons: Conversely computational learning theory is the study of what concepts particular learning schemes as representation and method detail as a

2. The Turing test has often been incorrectly interpreted as being a test of whether or not a person could distinguish between responses from a computer and responses from a person

Microsoft Visual basic has its host of problems one such being macros, Macros can be formed which can make havoc for a programmer with good intentions. Also the security issue rest

Home Entertainment: E-commerce has led to HOME ENTERTAINMENT. The video aspect usually includes a large-screen and/or high definition television or a projection system.

Designed, developed, tested and documented the demo created for NPBlox framework. NPBlox framework is a framework which enabled developers to create CLI/WEB/SNMP interfaces for