各位高手大家好,看看下面的代码对吗?个人觉得有问题
void inputInfo(int *year,int *month,int *day){
printf("input year:");
scanf("%d",&year); printf("input month:");
scanf("%d",&month); printf("input day:");
scanf("%d",&day);
}
int main(){
int year,month,day;
inputInfo(year,month,day); //此处传入int型变量对吗?
printf("time is %d:%d:%d",year,month,day);
return 0;
}