Innaz Review, Samsung Galaxy, price and specifications, Flash Android, Games For Your Apple, Jailbreak Tool For iOS, IMEI Unlock Method

Jumat, 17 Januari 2014

C# Program which calculated factorial to prime function

C# Program which calculated factorial to prime function - In the past, when I started to start blogging, many thoughts disturbed me. I want to have a blog with a nice and interesting look. I am constantly looking for basic tutorials from some web and blogs on the internet. And thankfully, one by one I started to do it, and of course have to go through some confusion process first, but the most important of a blog that is content, yes on the blog Innaz Review we will discuss a lot of information about gadgets that are very in need by you, now we will discuss first about C# Program which calculated factorial to prime function please refer to the information we will convey until completion:

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




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

hopefully C# Program which calculated factorial to prime function information can provide benefits for you in determining the gadgets that fit your needs in daily life.

you just read C# Program which calculated factorial to prime function if you feel this information is useful and want to bookmark or share it please use link https://innaz2.blogspot.com/2014/01/c-program-which-calculated-factorial-to.html if you want more information please search on other pages this blog.

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

Related : C# Program which calculated factorial to prime function

0 komentar:

Posting Komentar