Maxtron News, Android KitKat, stock firmware, Flash file, Lava iris, Ulefone Tiger, Mobile App, Marketing Tool, Infinix Stock Roms, Android Multi Tools Latest Version

C# Program which calculated factorial to prime function

C# Program which calculated factorial to prime function - for a long time we built this blog Maxtron News with the intention to advance the knowledge of the community about technological developments that continue to advance, because not everyone can enjoy the technology, so you will we present the technology news according to what you need, now we will discuss first about C# Program which calculated factorial to prime function please refer to the information we provide we feel quite complete because we summarize from reliable sources.

Articles : C# Program which calculated factorial to prime function
full Link : C# Program which calculated factorial to prime function
Article Csharp, Article programming, Article programs,

You can also see our article on:


C# Program which calculated factorial to prime function

C# Program which calculated factorial to prime function

Program Statement:
Write two functions max(int,int) and prime(int). max function will take two arguments and will return the maximum of two numbers in main. Then main function will pass this calculated factorial to prime function which will show that passed value is prime or not.

Solution:
 public class _max
{
public int max(int a, int b)
{
if (a > b)
return a;
else
return b;
}
public void prime(int n)
{
if (n == 1)
Console.WriteLine("\n\t\t{0} is maximum but not prime number!\n\n", n);
if (n >= 2)
{
if (n % 2 != 0)
{
Console.WriteLine("\n\t\t{0} is maximum and Prime number!\n\n", n);
}
else
{ Console.WriteLine("\n\t\t{0} is maximum but not a Prime number!\n\n", n); }
}
}
}




just so much information C# Program which calculated factorial to prime function

hopefully the article that we make this C# Program which calculated factorial to prime function can be useful for you in adding science about gadgets that continue to advance.

you just read the article with title C# Program which calculated factorial to prime function if you wish to bookmark or share it please use link https://katieandmaxtron.blogspot.com/2014/01/c-program-which-calculated-factorial-to.html to get more information please visit our other blog page.

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

Related : C# Program which calculated factorial to prime function

0 komentar:

Posting Komentar