本文章是杭电ACM在线刷题记录第一篇,刷题主要是为了提高自己的编程能力和快速应答能力。学习没有理由,只是想让自己变得更优秀。
原题回顾
Problem Description
Calculate A + B
Input
Each line will contain two integers A and B. Process to end of file.
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2
这题看似是非常简单的,凡是学过c语言的人基本都能写出相应的意思,但是在在线系统上要完全正确的提交上自己的代码,还是有点难度的,下面我们就来看看几种常见的错误。
NO.1 错误点一
大家很容易写出如下类似普遍错误的代码:
#include <stdio.h>
int main(void