基础的两道编程题,求助大神
#include<stdio.h>
int a,b,c;
int main(){
void team(int a,int b,int c);
int A,B,C;
printf("enter your number:");
scanf("%d",&C);
a=C%10;
b=(C/10)%10;
c=C/100;
if(a==b==c||(a==4&&b==9&&c==5))
printf("0");
team(a,b,c);
do{A=a*100+b*10+c;
B=c*100+b*10+a;
C=A-B;
printf("%d-%d=%d",&A,&B,&C);
a=C%10;
b=(C/10)%10;
c=C/100;
team(a,b,c);
}while(C!=495);
return 0;
}
void team(int a,int b,int c){
int d;
if(a>b)
if(c>b)
{d=c;
c=b;
b=d;}
else {
d=a;
a=b;
b=d;
if(b<c)
{d=c;
c=b;
b=d;}
}}
#include<stdio.h>
int m[13];
int main(){
int i,total,year,month,day;
total=0;
void day_month_year(int year,int month,int day);
printf("year,month,day",&year,&month,&day);
day_month_year(year,month,day);
for(i=1;i<month;i++){
total=total+m[i];
}
total=total+day;
printf("是%d年的第%d天",year,total);
return 0;
}
void day_month_year(int year,int month,int day){
if((year%4==0&&year%100!=0)&&year%400==0)
m[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
else
m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
求大神指出错误!谢谢~