
백준 10951번 문제 : 클릭
EOF를 쓰는 문제였습니다.
C언어 풀이:
#include<stdio.h>
int main(){
int a,b;
while(scanf("%d %d", &a, &b)!=EOF){
if(0<a && b<10){
printf("%d\n",a+b);
}
else{
break;
}
}
}
EOF는 C언어에서 End of File의 약자로 입력을 그만하겠다는 것을 알리기위한 함수입니다.