Using System;
Using System. Threading;
Namespace KeyboardRecord
{
/// <Summary>
/// Summary of Class1.
/// </Summary>
Class Class1
{
/// <Summary>
/// Main entry point of the application.
/// </Summary>
[STAThread]
Static void Main (string [] args)
{
//
// TODO: Add code here to start the application
//
String a = Console. ReadLine ();
If (a. Length! = 15)
{
Console. WriteLine ("Please input correct idnumber ");
}
Else
{
Console. WriteLine (getCheckCode ());
}
}
Static string getCheckCode (string sfzh)
{
Char [] strJiaoYan = {1, 0, X, 9, 8, 7, 6, 5, 4, 3, 2 };
Int [] intQuan = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1 };
String strTemp;
Int intTemp = 0;
StrTemp = sfzh. Substring (0, 6) + "19" + sfzh. Substring (6 );
For (int I = 0; I <= strTemp. Length-1; I ++)
{
IntTemp + = int. Parse (strTemp. Substring (I, 1) * intQuan [I];
}
IntTemp = intTemp % 11;
Return strTemp + strJiaoYan [intTemp];
}
}
}