scanf中是什么内容,在程序运行时就要先敲什么内容。%d,%lf,可用具体代替。
#include<stdio.h>
int main()
{
int price=0,amount=0;
scanf("请输入金额(元)%d",&price);
scanf("请输入票面(元)%d",&amount);
int change=amount-price;
printf("找您%d元",change);
return 0;
}
scanf中是什么内容,在程序运行时就要先敲什么内容。%d,%lf,可用具体代替。
#include<stdio.h>
int main()
{
int price=0,amount=0;
scanf("请输入金额(元)%d",&price);
scanf("请输入票面(元)%d",&amount);
int change=amount-price;
printf("找您%d元",change);
return 0;
}