Created
May 21, 2021 06:01
-
-
Save EifelMono/c4d2c8e157daca50e9a8543eb59f8066 to your computer and use it in GitHub Desktop.
Modulo für Heinz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
foreach(var calibrationPackageCount in Enumerable.Range(0, 10)) | |
{ | |
Console.Write($"calibrationPackageCount={calibrationPackageCount,2}"); | |
var v1= (calibrationPackageCount % 2).Equals(0) ? 0 : 1; | |
var v2= calibrationPackageCount % 2; | |
Console.Write($" Modulo {v1} {v2}"); | |
var v3= (calibrationPackageCount / 2).Equals(0) ? 0 : 1; | |
var v4= calibrationPackageCount / 2; | |
Console.Write($" Diff {v3} {v4}"); | |
Console.WriteLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment