|
|
|
@ -26,7 +26,6 @@ namespace ConsoleApplication9
|
|
|
|
|
int q1 = QuerSumme(positionszahl);
|
|
|
|
|
int q2 = 0;
|
|
|
|
|
for (int i = 1; i <= 10; i++) {
|
|
|
|
|
Console.WriteLine(Convert.ToString(q2 + "\r\n"));
|
|
|
|
|
q2 += ((int)seriennummerChar[i]-48);
|
|
|
|
|
}
|
|
|
|
|
int quersumme = (int)q1 + (int)q2;
|
|
|
|
@ -35,6 +34,12 @@ namespace ConsoleApplication9
|
|
|
|
|
int result = 8 - subtrahend;
|
|
|
|
|
if (result == 0) result = 9;
|
|
|
|
|
|
|
|
|
|
if (result.Equals((int)seriennummerChar[11] - 48))
|
|
|
|
|
{
|
|
|
|
|
int pruefziffer = ((int)seriennummerChar[11] - 48);
|
|
|
|
|
Console.WriteLine("Die Prüfziffer {0} konnte validiert werden.", pruefziffer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -48,7 +53,11 @@ namespace ConsoleApplication9
|
|
|
|
|
string seriennummer = Console.ReadLine();
|
|
|
|
|
int erg = bp.pruefeSeriennummer(seriennummer);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(erg);
|
|
|
|
|
Console.WriteLine("Das Programm lieferte die Prüfziffer " + erg + " zurück.");
|
|
|
|
|
|
|
|
|
|
// Konsolenfenster offen halten
|
|
|
|
|
Console.WriteLine("Druecken Sie zum Beenden eine beliebige Taste");
|
|
|
|
|
Console.ReadKey();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|