啊哈磊_编程从这里起步

标题: 这不是我要的结果 [打印本页]

作者: i来    时间: 2019-1-17 17:45
标题: 这不是我要的结果
#include <stdio.h>
#include <stdlib.h>
int main()
{
        long a,b,c;
    scanf("a",&a);
    scanf("b",&b);
    c=a+b;
    printf("c",c);
        system("pause");
        return 0;
}



作者: i来    时间: 2019-1-17 17:46
这个怎么了。。。。。。
作者: xjzb    时间: 2019-1-17 20:26
本帖最后由 xjzb 于 2019-1-17 20:29 编辑

#include <stdio.h>
#include <stdlib.h>
int main()
{
    long a,b,c;
    scanf("%ld",&a);
    scanf("%ld",&b);
    c=a+b;
    printf("%ld\n",c);
    system("pause");
    return 0;
}

a b.c

193 Bytes, 下载次数: 1


作者: Forinser    时间: 2019-1-19 05:50
printf("c",c);是什么东西
long的输出应该用%ld吧
作者: asa    时间: 2019-7-30 16:04
emm.........
对齐就可以了!
printf("c",c);有问题。
#include <stdio.h>
#include <stdlib.h>
int main()
{
    long a,b,c;
    scanf("%ld",&a);
    scanf("%ld",&b);
    c=a+b;
    printf("%ld\n",c);
    system("pause");
    return 0;
}




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