about summary refs log tree commit diff
path: root/COCI/2006-2007/contest1/okviri.c
blob: 33d186c2e19d8e0fddef3d4aaefc145e2d9712fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <stdio.h>
#include <string.h>

void ln1(char len)
{
	char i;

	for (i = 0; i < len; i++) {
		if (i % 12 == 10)
			putchar(42);
		else if (i % 4 == 2)
			putchar(35);
		else
			putchar(46);
	}

	putchar(10);
}

void ln2(char len)
{
	char i;

	for (i = 0; i < len; i++) {
		if (i % 12 == 9 || i % 12 == 11)
			putchar(42);
		else if (i % 2)
			putchar(35);
		else
			putchar(46);
	}

	putchar(10);
}

void ln3(char *s)
{
	char i;

	printf("#.%c.", *s);

	for (i = 1; i < strlen(s); i++) {
		if (i % 3 == 1)
			printf("#.%c.", s[i]);
		else
			printf("*.%c.", s[i]);
	}

	if (strlen(s) % 3)
		puts("#");
	else
		puts("*");
}

int main()
{
	char s[16], len;

	scanf("%s", s);
	len = strlen(s) * 4 + 1;

	ln1(len);
	ln2(len);
	ln3(s);
	ln2(len);
	ln1(len);

	return 0;
}