Python ) 파이썬으로 주민번호 유효성검사
validNumber = [2,3,4,5,6,7,8,9,2,3,4,5] userNumber = []temp = []for i in range(len(validNumber)): temp.append(validNumber[i] * userNumber[i])print(temp)sum = 0for i in range(len(temp)): sum += temp[i]print(sum)namerge = sum % 11print(namerge)key = 11 - namergeif len(str(key)) == 2: key = key % 10 if key == userNumber[12]: print("OK") else: print("NO")else: if key ..
React ) 리액트로 사업자번호 유효검사
import logo from './logo.svg';import { useState } from 'react';import './App.css';function Main(){ const validNumber = [1,3,7,1,3,7,1,3,5]; const [businessNumArray, setBusinessNumArray] = useState([]); const [tempArray, setTempArray] = useState([]); //const [sum, setSum] = useState(null); return ( { event.preventDefault(); ..