Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.Write("Enter a value for x:");
- long x = long.Parse(Console.ReadLine());
- long y = 5;
- long z = 7;
- bool xy = (x % y) == 0;
- bool xz = (x % z) == 0;
- if (xy && xz)
- {
- Console.WriteLine("number is divisible by 5 and 7");
- }
- else
- {
- Console.WriteLine("the number is not divisible by 5 и 7");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement