Advertisement
Fundamentalen

DivideBy7And5

Mar 14th, 2014
1,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System;
  2.  
  3. class DivideBy7And5
  4. {
  5.     static void Main()
  6.     {
  7.         Console.Write("Enter your number: ");
  8.         int number = int.Parse(Console.ReadLine());
  9.  
  10.         bool isDivided = (number % 5 == 0) && (number % 7 == 0);
  11.  
  12.         Console.WriteLine("This number can be divided by 7 and 5 = " + isDivided);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement