Advertisement
simeon_petrov

Homework 5 Problem 3

Sep 12th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 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 Problem_3_DivideBy7and5
  8. {
  9. class Devide
  10. {
  11. static void Main()
  12. {
  13. Console.Write("Enter the integer number: ");
  14. int n = int.Parse(Console.ReadLine());
  15. // if (n == 0) { Console.WriteLine("false"); return; }
  16.  
  17. if (n % 5 == 0 && n % 7 == 0 && n !=0)
  18. {
  19. Console.WriteLine("true");
  20. }
  21. else
  22. {
  23. Console.WriteLine("false");
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement