C语言减法

#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
scanf("请输入被减数%d\n 请输入减数%d\n",&a,&b);
c=a-b;
printf("商是%d\n",c);
system("pause");
return 0;
}
哪里错了?
是printf("差是%d\n",c);

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a,b,c;
puts(请输入被减数和减数");    
    scanf("%d%d",&a,&b);//不能在sacnf()中写字符串
    c=a-b;
    printf("商是%d\n",c);
    system("pause");
    return 0;
}

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-12-05
typedef struct{//typedef是小写开头!
//注意此处的top是整形指针
int data[Max_Size];
int top;
}SeqStack,*PSeqStack;
第2个回答  2015-12-05
改成这样scanf("%d%d",&a,&b);,scanf()里面不能随便写别的东西的
相似回答