Advertisement
mess0011

ue5_2

Nov 15th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 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 ConsoleApplication11
  8. {
  9.     class Program
  10.     {
  11.         public static bool teilbar(int zahl1, int zahl2)
  12.         {
  13.  
  14.             bool teilen = false;
  15.             if (zahl1 % zahl2 == 0)
  16.             {
  17.                 teilen = true;
  18.             }
  19.             return teilen;
  20.         }
  21.        
  22.                
  23.         static void Main(string[] args)
  24.         {
  25.             Console.WriteLine(teilbar(10, 3)); // zahl1%zahl2 == false or true
  26.  
  27.             Console.ReadLine();
  28.  
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement