Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- Console.WriteLine("Enter a random whole number to check if it's divisible by 5 and 7.");
- int number = int.Parse(Console.ReadLine());
- bool isDivisible = number % 5 == 0 && number % 7 == 0;
- Console.WriteLine("The number {0} is divisible by 5 and 7: {1}", number, isDivisible);
- }
Advertisement
Add Comment
Please, Sign In to add comment