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
Q. Implementation of Logic Micro-operations? For implementationlet's first ask questions how many logic operations can be performed with two binary variables. We can have 4 pos

Explain the Significance of Binary Data Controlled devices generally contain registers that are made up of binary digits (bits). The following illustration shows how these regi

Q. Describe the Errors? Errors  Two probabletypes of errors may take place in assembly programs:   a. Programming errors: They are familiar errors you may encounter in

Q. Define the System users? System users are defined as the people who employ information systems or who are affected by information system on a regular basis i.e. validating,

Find the Regular Grammar for the following Regular Expression: a(a+b)*(ab*+ba*)b.

Concept Development Journal General Information: Once you have researched and gained some insight into the topic you must then begin developing your ideas and your conceptua

What are the advantages of a Smart Card? Advantages of Smart Card as given below: a. This provides convenience and assists for multiple currencies over borders. b. Us

What is database integration? Database integration is the ability to give user-friendly and cost-effective software solutions for data infrastructure management by the interfac

1. Write the function makegrid. This function accepts a width and height and creates a grid/matrix of cells. The width gives the number of columns and the height the number of rows

From the early AI pioneering stage the research emphasis has been on developing machines with intelligent behaviour. Machine intelligence however is hard to achieve. Some