#include <stdio.h>
int main() {
int price, pay;
printf("请输入价格:\n");
scanf("%d", &price);
printf("请输入付款金额:\n");
scanf("%d", &pay);
if (pay > price) {
int change = pay - price;
printf("找您%d元", change);
}
else {
printf("您付款的金额不足\n");
}
return 0;
}
![](https://i-blog.csdnimg.cn/blog_migrate/70db9252813e2dc55450491ec844eca0.png)
![](https://i-blog.csdnimg.cn/blog_migrate/7a6d8bf8b1c3ad6e71223fb6cd141cb9.png)