Study guides

☆

Q: How do I wwrite a Program that prints all prime numbers from an array?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.

find even number in array

In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }

To write a C++ program to display the student details using class and array of object.

You can use a loop statement to input the numbers. Here is a code snippet:int i, arr[10];cout

Related questions

void f (int* a, int len) { if (!a) return;for (int i=0; i<len; ++i) { if (a[i]%2) { printf ("%d is odd\n", a[i]); } else { printf ("%d is even\n", a[i]); } }

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.

find even number in array

In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }In Java: // This program adds all numbers in the array int sum = 0; for (int i = 0; i < myArray.length(); i++) { sum += myArray[i]; }

To write a C++ program to display the student details using class and array of object.

sorry

write an assembly language program to find sum of N numbers

You can use a loop statement to input the numbers. Here is a code snippet:int i, arr[10];cout

Open a computer program like Visual Basic, Java, or C#, and then create an object and label it as an array. Input your 10 numbers into the object, then loop through each object in the array to find the sum, average, and mean by writing code in the program.

How to write a program for mouse in microprocessor?

intgetLargest(int array[], const int asize) {int largest = array[0];int i;for (i = 1; i < asize; ++i) {if (largest < array[i])largest = array[i];}return largest;}

People also asked