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); }
}
}
}
BalasHapusYou best career option in because very big scope in india digimanthan . marketing now many peoples are promoting his business online ,100% job placement in digital marketing
digital marketing course in janakpuri
digital marketing course in dwarka
digital marketing course in rajouri garden
the art of cannabis is tetrahydrocannabinol, one of the 483 known compounds in the plant, including at least 65 other cannabinoids
BalasHapusbuy real weed online
how to buy weed online
buy legal weed online
buy recreational weed online
buy weed edibles online
can i buy weed online
buy medical weed online
buy weed online canada
buying weed online reviews
buy weed online legit
buy weed online without medical card
buy weed seeds online canada
order marijuana online
order marijuana seeds online
how to order marijuana online
order marijuana online without a medical card
can you order medical marijuana online
order marijuana online