#include<stdio.h>
int main()
{
int t=0;
float n,sum=0;
while(scanf("%f",&n)!=EOF)
{
sum+=n;
t++;
if(t==12) printf("$%.2f\n",sum/12);
}
}
时间: 2024-10-23 11:33:32
#include<stdio.h>
int main()
{
int t=0;
float n,sum=0;
while(scanf("%f",&n)!=EOF)
{
sum+=n;
t++;
if(t==12) printf("$%.2f\n",sum/12);
}
}