hho-1 / TR-ID-Number-Algorithm

Home Page:https://tc-id-number-algorithm.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TC-ID-Number-Algorithm

Description

Purpose of the this coding challenge is to write a TypeScript code that given TR Identity Number, returns valid or invalid.

Valid TR Identity Number must follow these rules:

  • TR Identity Number actually consists of 9 digits, the last 2 digits have been added for control/verification purposes.
  • The ID number cannot start with 0.
  • The 10th digit is obtained by using the first 9 digits, and the 11th digit is obtained by using the first 10 digits. Add the digits in the 1st, 3rd, 5th, 7th and 9th digits, multiply by 7 and subtract the sum of the digits in the 2nd, 4th, 6th and 8th digits.
  • The units digit of the result obtained (mod 10) gives the 10th digit of the ID number.
  • When we add the first 9 digits of the ID number and the 10th digit obtained by the above method, the ones digit (mod 10) gives the 11th digit.

Project Outcome

https://tc-id-number-algorithm.vercel.app

About

https://tc-id-number-algorithm.vercel.app


Languages

Language:TypeScript 42.1%Language:JavaScript 39.0%Language:HTML 18.9%