杭电ACM 1000题
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                杭电ACM 1000题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            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
                        
                        
                        Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2
我的答案:
include<stdio.h> void main() {int a,b,c;while(scanf("%d %d",&a,&b)!=EOF){c=a+b;printf("%d\n",c);} }我的問題在于“end of file”,直白的說,處理到文件結束,將緩存區中的東西都讀出來,查了之后發現,
需要寫成這樣一種形式while(scanf("%d %d",&a,&b)!=EOF),,,我也不是很懂。
總結
以上是生活随笔為你收集整理的杭电ACM 1000题的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 未命名文章图灵奖Yann LeCun团队
 - 下一篇: win10打不开磁盘提示本次操作由于这台