﻿using System;
using System.Linq;

namespace DivideBy5And7
{
    class Program
    {
        static void Main()
        {
            while (true)
            {
                Console.Write("Please enter a number: ");
                int number = int.Parse(Console.ReadLine());

                Console.Write("Can be divided by 5 and by 7? ");

                if (number == 0)
                {
                    Console.WriteLine(false);
                }
                else if (number % 5 == 0 && number % 7 == 0)
                {
                    Console.WriteLine(true);
                }
                else
                {
                    Console.WriteLine(false);
                }

                Console.Write("Do you want to check another number?(Y/N) ");
                char answer = Console.ReadLine().ToUpperInvariant()[0];

                if (answer == 'Y')
                {
                    continue;
                }
                else if (answer == 'N')
                {
                    break;
                }
                else
                {
                    Console.WriteLine("Invalid answer!");
                    break;
                }
            }
        }
    }
}
