Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Write a Boolean expression that checks for given integer if it can be divided (without remainder) by 7 and 5 in the same time.
- using System;
- class Divide
- {
- static void Main()
- {
- Console.Write("Enter number a = ");
- string numberA = Console.ReadLine();
- int a = int.Parse(numberA);
- bool i = ((a % 7 == 0) && (a % 5 == 0) && (a != 0));
- Console.WriteLine(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement