标签:ext std .com print printf scanf turn mamicode i++
#include<stdio.h>
main()
{
int a[12],i,m=0,n=0;/*m:给妈妈整百的钱,n:自己手里的钱*/
for(int i=0;i<=11;i++) scanf("%d",&a[i]);
for(int i=0;i<=11;i++)
{
m=((n+300-a[i])/100)*100+m;
n=(n+300-a[i])-(n+300-a[i])/100*100;
if(n<0)
{
printf("-%d",i+1);
return 0;
}
}
printf("%d",m*1.2+n);
return 0;
}
2019-03-17
标签:ext std .com print printf scanf turn mamicode i++
原文地址:https://www.cnblogs.com/hanahanahanabe/p/10545735.html