[ create a new paste ] login | about

Link: http://codepad.org/uILR9yod    [ raw code | fork ]

C, pasted on Oct 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>

int main()
{
	double x, y, r;
	int i;

	while (1) {
		i = scanf("%lf%lf", &x, &y);
		if (i == EOF) break;
		if (i != 2) continue;
		r = x * x + y * y;
		printf("x=%f y=%f r=%f %s\n", x, y, r, (r <= 1.0) ? "中" : "外");
	}
	return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: