#include<stdio.h>
int main(){
char ID[19];
int year=0,i;
scanf("%s",&ID);
for(i=6;i<=9;i++)
year=10*year+(ID[i]-'0');
printf("%d",2018-year);
if((ID[16]-'0')%2==1)
printf("男\n");
else
printf("女\n");
return 0;
编写一个程序:输入一个身份证号,判断该号码对应的人是多少岁,是男是女
最新推荐文章于 2023-05-28 20:37:38 发布