Test All Gadget, Z3X BOX Samsung, Miracle Box, Smart Phone Flash Tool, Stock ROMs, Android Tool, apps, Data Plans Internet

Jumat, 17 Januari 2014

C# Program which calculated factorial to prime function

C# Program which calculated factorial to prime function - discussing about technology is my hobby, with media blogs Test All Gadget we can share the knowledge of technology that continues to grow with various ways of use that is intended to simplify your life, now we will discuss first about that in your search that is C# Program which calculated factorial to prime function please refer to our explanation because we will try to make a complete article for you.

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); }
}
}
}




enough already articles C# Program which calculated factorial to prime function

hopefully the information C# Program which calculated factorial to prime function that we submit on this blog can be useful for your life and all the people who visit this blog.

you just finished reading the article with the title C# Program which calculated factorial to prime function if you intend to bookmark or shre please use the link https://testallforone.blogspot.com/2014/01/c-program-which-calculated-factorial-to.html and do not visit other pages on this blog because it still sangant a lot of information about gadgets from the old to the latest.

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

Related : C# Program which calculated factorial to prime function

2 komentar: