/home/toolbox/public_html/solutions/126/12611/a.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <sys/types.h>
4 #include <sys/stat.h>
5 #include <fcntl.h>
6 #include <stdlib.h>
7 #include <math.h>
8 #include <stdint.h>
9
10 #define TRUE (1 == 1)
11 #define FALSE (1 != 1)
12
13 #define DEBUG if (FALSE)
14
15 /* fprintf(stderr, "functionName: message", varslist); */
16
17 /*
18 * Author: Isaac Traxler
19 * Date: 2015-10-04
20 * Purpose: fun
21 * Problem: 12611
22 */
23
24 /*
25 * This template reads data a specified number of times.
26 */
27
28 int numberOfTimes;
29 int R;
30
31
32 void init()
33 {
34 /* FUNCTION init */
35 scanf("%d ", &numberOfTimes);
36 } /* FUNCTION init */
37
38 void dump()
39 {
40 /* FUNCTION dump */
41 } /* FUNCTION dump */
42
43 void getInput()
44 {
45 /* FUNCTION getInput */
46 scanf(" %d ", &R);
47 } /* FUNCTION getInput */
48
49 void process()
50 {
51 /* FUNCTION process */
52 int rx;
53 int lx;
54 int y;
55
56 lx = R / 4 * 9;
57 rx = R / 4 * 11;
58 y = R / 2 * 3;
59
60 printf("%d %d\n", -lx, y); /* upper left */
61 printf("%d %d\n", rx, y); /* upper right */
62 printf("%d %d\n", rx, -y); /* lower right */
63 printf("%d %d\n", -lx, -y); /* lower left */
64
65 } /* FUNCTION process */
66
67 int main()
68 {
69 /* main */
70 int i;
71
72 init();
73 for (i=1; i<=numberOfTimes; i++)
74 {
75 /* while */
76 printf("Case %d:\n", i);
77 getInput();
78 process();
79 } /* while */
80
81 return EXIT_SUCCESS;
82 } /* main */
83
84