Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication11
- {
- class Program
- {
- public static bool teilbar(int zahl1, int zahl2)
- {
- bool teilen = false;
- if (zahl1 % zahl2 == 0)
- {
- teilen = true;
- }
- return teilen;
- }
- static void Main(string[] args)
- {
- Console.WriteLine(teilbar(10, 3)); // zahl1%zahl2 == false or true
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement