当前位置:首页 > 代码 > 正文

身份证录入系统源代码(身份证识别开源代码)

admin 发布:2022-12-19 17:45 190


本篇文章给大家谈谈身份证录入系统源代码,以及身份证识别开源代码对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

使用Android开发环境实现《身份证录入系统》app

给你个思路

1,跟布局是线性布局垂直结构然后第一行字直接textview第二个是个imageview,这两个加个属性center

2,剩下的文字和输入框部分就是线性布局的横向布局一个textview一个edittext,你直接抽取出来在这个界面布局里include就好了

3,选择性别那里就是个checkbox,看属性添加需要几个

4,最后一个就是个保存按钮,看图的样子直接设置个左边距右边距就有那么宽了

自己动手写写,很简单的,写好说出去也很理解自己也会很开心的

数据结构与C语言综合训练:身份证管理程序 求源代码

程序清单:

#includestdio.h

#includestdlib.h

#includestring.h

#includeconio.h

typedef struct

{

char name[20];

char sex[5];

char folk[5];

char birth[10];

char add[20];

char id[20];

}Person;

Person ID[100];

int menu_select()

{ char c;

do{system("cls");

printf("\n\t\t %c%c%c%c%c%c%cIdentityConctrol System%c%c%c%c%c%c%c\n\n\n",3,3,3,3,3,3,3,3,3,3,3,3,3,3);

printf ("\t%c 1.Input date \n\n",21);

printf ("\t%c 2.Display date \n\n",21);

printf ("\t%c 3.Sort the people by birth \n\n",21);

printf ("\t%c 4.Insert an ID \n\n",21);

printf ("\t%c 5.Delete an ID \n\n",21);

printf ("\t%c 6.Search an ID by name \n\n",21);

printf ("\t%c 7.Count the people \n\n",21);

printf ("\t%c 8.Copy date from file \n\n",21);

printf ("\t%c 9.Write date to file \n\n",21);

printf ("\t%c 0.exit \n\n",21);

printf(" (0-9):");

c=getchar();

}while(c'0'||c'9');

return(c-'0');

}

int input(PersonID[],int n)

{int i=0;

charsign='w',x[10];system("cls");

printf("\tInputthe date:\n");

while(sign!='n'sign!='N')

{

printf("\tName:");

scanf("%s",ID[n+i].name);

printf("\tSex:");

scanf("%s",ID[n+i].sex);

printf("\tFolk:");

scanf("%s",ID[n+i].folk);

printf("\tbirth:");

scanf(" %s",ID[n+i].birth );

printf("\tAddress:");

scanf(" %s",ID[n+i].add);

printf("\tID:");

scanf(" %s",ID[n+i].id);

gets(x);

printf(" Are you sure to continue?(Y/N)\n");

scanf(" %c",sign);

i++;

}

return(n+i);

}

voiddisplay(Person ID[],int n)

{

inti;system("cls");

printf("---------------------------------------------------------------------\n");

printf("name sex folk birth add id \n");

printf("---------------------------------------------------------------------\n");

for(i=1;in+1;i++)

{

printf("%-10s%-10s%-10s%-15s%-15s%-15s\n",ID[i-1].name,ID[i-1].sex,ID[i-1].folk,ID[i-1].birth,ID[i-1].add,ID[i-1].id);

if(i1i%10==0)

{printf("----------------------------------------------------------------\n");

system("pause");

printf("---------------------------------------------------------------\n");

}

}

system("pause");

}

voidsort_by_birth(Person ID[],int n)

{

int i,j;

chart[20];system("cls");

for(i=0;in-1;i++)

for(j=0;jn-1-i;j++)

if(strcmp(ID[j].birth,ID[j+1].birth)0)

{strcpy(t,ID[j+1].name);

strcpy(ID[j+1].name,ID[j].name);

strcpy(ID[j].name,t);

strcpy(t,ID[j+1].sex);

strcpy(ID[j+1].sex,ID[j].sex);

strcpy(ID[j].sex,t);

strcpy(t,ID[j+1].folk);

strcpy(ID[j+1].folk,ID[j].folk);

strcpy(ID[j].folk,t);

strcpy(t,ID[j+1].birth);

strcpy(ID[j+1].birth,ID[j].birth);

strcpy(ID[j].birth,t);

strcpy(t,ID[j+1].add);

strcpy(ID[j+1].add,ID[j].add);

strcpy(ID[j].add,t);

strcpy(t,ID[j+1].id);

strcpy(ID[j+1].id,ID[j].id);

strcpy(ID[j].id,t);

}

}

int insert_an_id(PersonID[],int n)

{

charx[100];system("cls");

printf("\n\tName:");

scanf("%s",ID[n].name);

printf("\tSex:");

scanf("%s",ID[n].sex);

printf("\tFolk:");

scanf("%s",ID[n].folk);

printf("\tbirth:");

scanf("%s",ID[n].birth);

printf("\tAddress:");

scanf(" %s",ID[n].add);

printf("\tID:");

scanf(" %s",ID[n].id);

gets(x);

n++;

sort_by_birth(ID,n);

printf("\n");

return(n);

}

intdelete_an_id(Person ID[],int n)

{

char s[20];

inti=0,j;system("cls");

printf("Personname you want to delete :\n");

scanf("%s",s);

while(strcmp(ID[i].name,s)!=0in)i++;

if(i==n)

{

printf("Sorry,there is no such a person \n");

return(n);

}

for(j=i;jn-1;j++)

{

strcpy(ID[j].name,ID[j+1].name);

strcpy(ID[j].sex,ID[j+1].sex);

strcpy(ID[j].folk,ID[j+1].folk);

strcpy(ID[j].birth,ID[j+1].birth);

strcpy(ID[j].add,ID[j+1].add);

strcpy(ID[j].id,ID[j+1].id);

}

printf("Delete ID successfully \n");

return(n-1);

}

voidsearch_by_name(Person ID[],int n)

{ char s[20];

inti=0;system("cls");

printf(" Whatis the name you want to find:");

gets(s);

while(strcmp(ID[i].name,s)!=0in)i++;

if(i==n)

{

printf("Sorry,thereis no such a person \n");

system("pause");

return(n);

}

printf("name sex folk birth add id \n");

printf("%-10s%-10s%-10s%-15s%-15s%-15s\n",ID[i].name,ID[i].sex,ID[i].folk,ID[i].birth,ID[i].add,ID[i].id);

system("pause");

}

void count(PersonID[],int n)

{ charstr1[5],str2[5],str3[5];

inti,j=0,p,q,r;system("cls");

printf("pleaseenter the current year:\n");

gets(str1);

p=atoi(str1);

printf("pleaseenter the age you want to count:\n");

gets(str3);

r=atoi(str3);

printf("name sex folk birth add id \n");

for(i=0;in;i++)

{ strncpy(str2,ID[i].birth,4);

q=atoi(str2);

if((p-q)==r)

printf("%-10s%-10s%-10s%-15s%-15s%-15s\n",ID[i].name,ID[i].sex,ID[i].folk,ID[i].birth,ID[i].add,ID[i].id);

j++;

}

printf("Thereare %d person about this age.\n",j);

system("pause");

}

intaddfromText(Person ID[],int n)

{

int i=0,num;

FILE *fp;

char filename[20];

printf("Enter the file name :\n");

scanf(" %s",filename);

if((fp=fopen(filename,"rb"))==NULL)

{

printf("Cannot open the file : \n");

system("pause");

return(n);

}

fscanf(fp,"%d",num);

while(inum)

{

fscanf(fp,"%s%s%s%s%s%s",ID[n+i].name,ID[n+i].sex,ID[n+i].folk,ID[n+i].birth,ID[n+i].add,ID[n+i].id);

i++;

}

n+=num;

fclose(fp);

printf("\n");

printf(" Readsuccessfully \n");

system("pause");

return(n);

}

voidwritetotext(Person ID[],int n)

{

int i=0;

FILE *fp;

charfilename[100];

printf("Enter a filename: \n");

scanf(" %s",filename);

if((fp=fopen(filename,"w"))==NULL)

{

printf("Cannot open the file : \n");

system("pause");

return;

}

fprintf(fp,"%d\n",n);

while(in)

{

fprintf(fp,"%s%s%s%s%s%s",ID[i].name,ID[i].sex,ID[i].folk,ID[i].birth,ID[i].add,ID[i].id);

i++;

}

fclose(fp);

printf("Writedate to file successfully\n");

}

void main()

{

int n=0;

for(;;)

{

switch(menu_select())

{

case 1:

printf(" Input the ID of the person:\n");

n=input(ID,n);

break;

case 2:

display(ID,n);

break;

case 3:

printf("Date sort by birth:\n");

sort_by_birth(ID,n);

display(ID,n);

break;

case 4:

printf("Insert an ID: \n");

n=insert_an_id(ID,n);

display(ID,n);

break;

case 5:

printf("Delete an ID: \n");

n=delete_an_id(ID,n);

break;

case 6:

printf("Searth an ID by name: \n");

search_by_name(ID,n);

break;

case 7:

printf("count the age of people:\n");

count(ID,n);

break;

case 8:

printf("Copy date from file:\n ");

addfromText(ID,n);

break;

case 9:

printf("write date to file:\n \n");

writetotext(ID,n);

break;

case 0: system("cls");

printf("\n\n\t\tThank you !");

system("pause");exit(0);

}

}

}

好长。

学生信息管理系统最简单源代码。

方法一:

1、创建一个c语言项目。然后右键头文件,创建一个Stu的头文件。

2、然后编写头文件的代码。再将数据结构的增删改查和结构体写入头文件。

3、然后在源文件中创建main源文件和Stu源文件。再main文件中写入intmian()代码。

4、然后在mian主函数中,写入while语句无限循环。再写入Init函数。

5、在Stu源文件的Init函数用printf语句,将学生管理系统输出。再创建链表的头节点head。

6、然后用switch函数对操作进行判断。再执行数据结构的增删改查功能。这样一个学生管理系统的基本框架就完成了。

方法二:

1、新建一个学生实体类,用于存放学生的各项信息。

2、新建一个链表节点类,每个节点存放一个学生信息及下一个节点的引用。

3、添加一个主操作类,并添加本系统的菜单方法。

4、定义链表的头节点,当前最后一个节点,以及主控制逻辑信息。

5、使用io流逐行读取存有学生信息的文本文件,对每行字符串,采用\t分割后得到一个字符串数组,数据各项即为一个学生的具体信息。然后新建一个节点加入到链表。

6、运行结果:

关于身份证录入系统源代码和身份证识别开源代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/15939.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载