#include <stdio.h>
int main(){
int A, B;
scanf("%d %d",&A,&B);
printf("%d",A+B);
return 0;
}
PS:
main函数必须是int返回值
有一些书上的,都使用了void main( ) ,其实这是错误的。C/C++ 中从来没有定义过void main( ) 。C++ 之父 Bjarne Stroustrup 在他的主页上的 FAQ 中明确地写着 “The definition void main( ) { /* … */ } is not and never has been C++, nor has it even been C.”
int main(void){//标准模板
return 0;
}