|
|
|
@ -1,8 +1,4 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ConsoleApplication9
|
|
|
|
|
{
|
|
|
|
@ -28,32 +24,18 @@ namespace ConsoleApplication9
|
|
|
|
|
|
|
|
|
|
int positionszahl = (int)seriennummerChar[0] - 64;
|
|
|
|
|
int q1 = QuerSumme(positionszahl);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(Convert.ToString(q1));
|
|
|
|
|
|
|
|
|
|
string snqs = new string(seriennummerChar);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(snqs + "\r\n");
|
|
|
|
|
|
|
|
|
|
int quersumme = 0;
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(Convert.ToString(seriennummerChar[0] + "!!!! \r\n"));
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i <= 10; i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(seriennummerChar[i] + "\r\n \r\n");
|
|
|
|
|
|
|
|
|
|
quersumme += Convert.ToInt32(seriennummerChar[i]);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(Convert.ToString(quersumme));
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
//int subtrahend = (quersumme % 9);
|
|
|
|
|
//int result = 8 - subtrahend;
|
|
|
|
|
//if (result == 0) result = 9;
|
|
|
|
|
int subtrahend = (quersumme % 9);
|
|
|
|
|
int result = 8 - subtrahend;
|
|
|
|
|
if (result == 0) result = 9;
|
|
|
|
|
|
|
|
|
|
return positionszahl;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|