啊哈磊_编程从这里起步

标题: 新手问个c=a+b的问题~ [打印本页]

作者: sunsharese    时间: 2013-8-28 20:21
标题: 新手问个c=a+b的问题~
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
    int a,b,c;
    scanf("%d %d",&a,&b);
    c=a+b;
    printf("%d+%d=d%",a,b,c);
    Sleep(5000);
        return 0;
}

新手中的新手...按教程在学...请教大神们~
为什么我运行的时候,输入任意两个数字...并不是得出结果.而是显示=d
例如我输入5+4  他就显示出5+4=d

作者: rosynirvana    时间: 2013-8-28 20:21
%d 不是 d%
作者: sunsharese    时间: 2013-8-28 20:23
果然...我的眼神果然有问题啊..看了几次没看出来~3Q
作者: 超神级    时间: 2013-8-28 20:46
{:soso__1371877932005623054_1:}我以前貌似好像也犯过同样的错误
作者: 4399APPLE    时间: 2013-11-24 10:55
超神级 发表于 2013-8-28 20:46
我以前貌似好像也犯过同样的错误

这也行。。。                     




欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/) Powered by Discuz! X3.2