Skip to content

Instantly share code, notes, and snippets.

@EifelMono
Created May 21, 2021 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EifelMono/c4d2c8e157daca50e9a8543eb59f8066 to your computer and use it in GitHub Desktop.
Save EifelMono/c4d2c8e157daca50e9a8543eb59f8066 to your computer and use it in GitHub Desktop.
Modulo für Heinz
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