Advertisement
remote87

Divide by 7 and 5

Aug 28th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _03DivideBy7And5
  8. {
  9.     class DivideBy7And5
  10.     {
  11.         static void Main()
  12.         {
  13.             Console.Write("Enter a number: ");
  14.             int number = int.Parse(Console.ReadLine());
  15.             if ((number % 5 == 0) && (number % 7 == 0))
  16.             {
  17.                 Console.WriteLine(true);
  18.             }
  19.             else
  20.             {
  21.                 Console.WriteLine(false);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement