c语言,可以帮看看我的代码有什么错的吗,我运行的时候没有输出,谢谢谢谢?
#include<stdio.h>#include<stdlib.h>structdate{intyear;intmonth;intday;};structfriend{...
#include <stdio.h>#include <stdlib.h>struct date{ int year; int month; int day;};struct friend{ char name[10]; struct date birthday;};int main(){ int i,n,max; struct friend fri; scanf("%d",&n); max=0; for(i=1;i<=n;i++) { scanf("%s%d%d%d\n",fri.name,&fri.birthday.year,&fri.birthday.month,&fri.birthday.day); if(fri.birthday.year>=max) max=fri.birthday.year; } printf("%s %d-%d-%d",fri.name,max,fri.birthday.month,fri.birthday.day); return 0;}
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询