/******************************************************/ /* Introduction to Programming */ /* By Dr. ANTF */ /* www.antf.net */ /* Copyright 2015 */ /* */ /* C# 407 - Problem 6: Is Multiple */ /******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DOS { class Program { static bool IsMultiple(int a, int b) { if (b % a == 0) return true; return false; } static void Main(string[] args) { int x, y; Console.Write("Please enter the first number: "); x = int.Parse(Console.ReadLine()); Console.Write("Please enter the second number: "); y = int.Parse(Console.ReadLine()); if (IsMultiple(x, y)) Console.WriteLine("\n\n{0} is a multiple of {1}", y, x); else Console.WriteLine("\n\n{0} is NOT a multiple of {1}", y, x); Console.ReadKey(); } } }