Created
April 5, 2014 09:46
-
-
Save memememomo/9989740 to your computer and use it in GitHub Desktop.
入力を安全に受け取る ref: http://qiita.com/memememomo/items/34e86058872b2fe508bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
char buf[80]; | |
int a, b; | |
fgets(buf, 80, stdin); | |
sscanf(buf, "%d %d", &a, &b); | |
printf("%d + %d = %d\n", a, b, a+b); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment