新人求助 初学者
输入被除数和除数,输出计算的算式,商,余数 例如输入 17 3
输出 17/3=5....2
一头雾水 怎么样能把式子输出了 只知道怎么输出计算结果 求达人解答
程序代码:#include<stdio.h>
#include<stdlib.h>
int main()
{
int a, b;
int c, d; //商和余数
printf("Please input a,b:");
scanf("%d%d",&a,&b);
if(b == 0)
{
printf("除数不能为0!\n");
exit(0);
}
c = a / b;
d = a % b;
printf("%d/%d=%d……%d\n",a,b,c,d);
system("pause");
return 0;
}想输出一些特殊字符的话都是print()函数的应用!
