-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevel1.cs
More file actions
128 lines (107 loc) · 3.16 KB
/
Level1.cs
File metadata and controls
128 lines (107 loc) · 3.16 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using System.Globalization;
namespace ConsoleApp1
{
internal class Level1
{
static void Lv1Main(string[] args)
{
ex12();
}
static void ex1()
{
Console.WriteLine("Hello World!");
}
static void ex2()
{
String s = Console.ReadLine();
String[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
Console.WriteLine(a + b);
}
static void ex3()
{
String s = Console.ReadLine();
String[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
Console.WriteLine(a - b);
}
static void ex4()
{
String s = Console.ReadLine();
String[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
Console.WriteLine(a * b);
}
static void ex5()
{
String s = Console.ReadLine();
String[] ss = s.Split();
double a = double.Parse(ss[0]);
double b = double.Parse(ss[1]);
Console.WriteLine(a/b);
}
static void ex6()
{
String s = Console.ReadLine();
String[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
Console.WriteLine("{0}\n{1}\n{2}\n{3}\n{4}", a + b, a - b, a * b, a / b, a % b);
}
static void ex7()
{
String s = Console.ReadLine();
Console.WriteLine(s + "??!");
}
static void ex8()
{
string s = Console.ReadLine();
int a = int.Parse(s);
Console.WriteLine("{0}", a - 543);
}
static void ex9()
{
string s = Console.ReadLine();
String[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
int c = int.Parse(ss[2]);
Console.WriteLine("{0}\n{1}\n{2}\n{3}", (a + b) % c, ((a % c) + (b + c)) % c, (a * b) % c, ((a % c) * (b % c)) % c);
}
static void ex10()
{
string s1 = Console.ReadLine();
string s2 = Console.ReadLine();
int a = int.Parse(s1);
int b = int.Parse(s2);
Console.WriteLine("{0}\n{1}\n{2}\n{3}", a * (b % 10), a * (b % 100 / 10), a * (b / 100), a * b);
}
static void ex11()
{
string s = Console.ReadLine();
String[] ss = s.Split();
long a = long.Parse(ss[0]);
long b = long.Parse(ss[1]);
long c = long.Parse(ss[2]);
Console.WriteLine(a+b+c);
}
static void ex12()
{
Console.WriteLine(@"\ /\
) ( ')
( / )
\(__)|");
}
static void ex13()
{
Console.WriteLine("|\\_/|");
Console.WriteLine("|q p| /}");
Console.WriteLine("( 0 )\"\"\"\\");
Console.WriteLine("|\"^\"` |");
Console.WriteLine("||_/=\\\\__|");
}
}
}