/home/toolbox/public_html/solutions/naq/2026/e.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 #include <ctype.h>
10
11 #define TRUE (1 == 1)
12 #define FALSE (1 != 1)
13
14 #define DEBUG if (FALSE)
15
16 /* fprintf(stderr, "functionName: message", varslist); */
17
18 /*
19 * Author: Isaac Traxler
20 * Date: 2026-10-03
21 * Purpose: fun
22 * Problem: E expresso
23 */
24
25 /*
26 * This template reads data a specified number of times.
27 */
28
29 int numberOfTimes;
30 int blocks;
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 ", &blocks);
47 } /* FUNCTION getInput */
48
49 void process()
50 {
51 /* FUNCTION process */
52 int i;
53 int j;
54
55 printf(".C");
56 for (i=2; i<blocks; i++)
57 {
58 printf(".");
59 }
60 printf("\n");
61 printf("C.");
62 for (i=2; i<blocks; i++)
63 {
64 printf(".");
65 }
66 printf("\n");
67 for (i=2; i<blocks; i++)
68 {
69 /* for each remaining row */
70 for (j=0; j<blocks; j++)
71 {
72 printf(".");
73 }
74 printf("\n");
75 } /* for each remaining row */
76
77 } /* FUNCTION process */
78
79 int main()
80 {
81 /* main */
82 int i;
83
84 init();
85 for (i=0; i<numberOfTimes; i++)
86 {
87 /* while */
88 getInput();
89 process();
90 } /* while */
91
92 return EXIT_SUCCESS;
93 } /* main */
94
95