#include <stdio.h>
int main()
{
int price=0;
printf("请输入金额(元):");
scanf("%d",&price);
int change=100-price;
printf("找您%d元。\n",change);
return 0;
}
运行代码后只需要输入价格然后回车就可以得到应有的change
#include <stdio.h>
int main()
{
int price=0;
printf("请输入金额(元):");
scanf("%d",&price);
int change=100-price;
printf("找您%d元。\n",change);
return 0;
}
运行代码后只需要输入价格然后回车就可以得到应有的change