C# Program to Print number of prime values in the array

C# Program to Print number of prime values in the array - is the information you are looking for, and in the blog Google News we have provided her, all right in this article titled C# Program to Print number of prime values in the array we will discuss it in full, in addition to the information we have also provided a lot of info about the latest gadgets and a wide range of tips and tricks that according to the gadget you are using, well please continue reading:

Penyanyi : C# Program to Print number of prime values in the array
Judul lagu : C# Program to Print number of prime values in the array
Article Csharp, Article programs,

You can also see our article on:


C# Program to Print number of prime values in the array

C# Program to Print number of prime values in the array

Program Statement:
Write a program which takes 10 values from user in an array and then show the number of prime values in the array.

Solution:
 public class arr
{
int c, count = 0, n;
int[] array = new int[10];
public void arr_func()
{
Console.WriteLine("\n\t\tEnter 10 element only!\n");
for (int x = 0; x < 10; x++)
array[x] = Convert.ToInt32(Console.ReadLine());
for (int y = 0; y < 10; y++)
{
n = array[y];
for (c = 2; c <= n - 1; c++)
{
if (n % c == 0)
{ break; }
}

if (c == n)
{
count++;
Console.WriteLine("\n\t\t{0} is prime number!\n", n);
}
}
Console.WriteLine("\n\t\tNumber of prime values : {0}\n", count);
}
}




Demikianlah Artikel C# Program to Print number of prime values in the array

Sekian Kunci gitar C# Program to Print number of prime values in the array, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sekian postingan Chord gitar lagu kali ini.

Anda sedang membaca artikel C# Program to Print number of prime values in the array dan artikel ini url permalinknya adalah https://googledoodlenewstoday.blogspot.com/2014/01/c-program-to-print-number-of-prime.html Semoga artikel ini bisa bermanfaat.

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : C# Program to Print number of prime values in the array

1 komentar:

  1. Thanks for sharing such an Amazing information, I Couldn’t leave without reading your blog.
    ดาวน์โหลด igoal

    BalasHapus