Info C# Program which calculated factorial to prime function - this blog we have built from a few years ago and already very much information about gadgets that we convey and a lot of blog visitors
New Blog Techno News who are satisfied with the information, we will always try to update the latest information for you, first about Info C# Program which calculated factorial to prime function many already we collect data to make this article so you do not miss the news, please see:
Articles :
Info C# Program which calculated factorial to prime function
full Link :
Info C# Program which calculated factorial to prime function
Article Csharp,
Article programming,
Article programs,
You can also see our article on:
Info 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); }
}
}
}
articles Info C# Program which calculated factorial to prime function finished in discussion
hopefully the information we convey about Info C# Program which calculated factorial to prime function can benefit you in getting new knowledge about technology,
you just finished reading the information Info C# Program which calculated factorial to prime function we hope this informmation can answer the question you submit to googlle, if you want to bookmark or share please use link https://moymoycikukecik.blogspot.com/2014/01/info-c-program-which-calculated.html and do not forget to always visit this blog to get the latest information every day.
Tag :
Csharp,
programming,
programs,
0 komentar:
Posting Komentar