|
|
|
@ -18,7 +18,6 @@ namespace ConsoleApplication9
|
|
|
|
|
zahl /= 10;
|
|
|
|
|
} while (zahl > 0);
|
|
|
|
|
|
|
|
|
|
querSumme = 0;
|
|
|
|
|
return querSumme;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -27,8 +26,10 @@ namespace ConsoleApplication9
|
|
|
|
|
// Buchstaben durch Zahl ersetzen (Grundlage: ASCII zuordnung)
|
|
|
|
|
char[] seriennummerChar = seriennummer.ToCharArray(0, 12);
|
|
|
|
|
|
|
|
|
|
int positionszahl = seriennummerChar[0] - 64;
|
|
|
|
|
seriennummerChar[0] = Convert.ToChar(positionszahl);
|
|
|
|
|
int positionszahl = (int)seriennummerChar[0] - 64;
|
|
|
|
|
int q1 = QuerSumme(positionszahl);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(Convert.ToString(q1));
|
|
|
|
|
|
|
|
|
|
string snqs = new string(seriennummerChar);
|
|
|
|
|
|
|
|
|
@ -38,7 +39,8 @@ namespace ConsoleApplication9
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(Convert.ToString(seriennummerChar[0] + "!!!! \r\n"));
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i <= 10; i++) {
|
|
|
|
|
for (int i = 0; i <= 10; i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(seriennummerChar[i] + "\r\n \r\n");
|
|
|
|
|
|
|
|
|
@ -47,7 +49,6 @@ namespace ConsoleApplication9
|
|
|
|
|
Console.WriteLine(Convert.ToString(quersumme));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//int quersumme = 2;
|
|
|
|
|
//int subtrahend = (quersumme % 9);
|
|
|
|
|
//int result = 8 - subtrahend;
|
|
|
|
|
//if (result == 0) result = 9;
|
|
|
|
@ -69,4 +70,3 @@ namespace ConsoleApplication9
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|