注册 登录
编程论坛 C++教室

关于C++的问题

轩辕凤潇 发布于 2011-09-12 19:15, 407 次点击
#include<stdio.h>
//using namespace std;

int main()
{
    int a,b,c;
    scanf("%d %d,&a,&b");
    c=a+b;
    printf("%d\n",c);
    system("pause")
    return 0;
}
请问哪里有错
我是刚来的,刚学C++不太懂
3 回复
#2
biancku2011-09-12 19:56
如下:
#include<iostream>
using namespace std;
int main()
{
    int a,b,c;
    scanf("%d %d",&a,&b);
    c=a+b;
    printf("%d\n",c);
    system("pause");
        return 0;
}
其实那个 system("pause"); 可以省略,它是调用系统暂停命令,初学者,没必要使用此函数。
#3
czsbc2011-09-12 20:09
感觉更像C。
#4
statics2011-09-13 14:18
路过
1