Update skeleton

This commit is contained in:
Jeehoon Kang
2020-06-01 21:51:16 +09:00
parent 4c850d5801
commit 1c0c9a5dbc
12 changed files with 807 additions and 181 deletions

View File

@@ -1,3 +0,0 @@
int main() {
return _Alignof(const int) == 4;
}

View File

@@ -1,10 +0,0 @@
int bar(int x, int y, int z){
int arith_mean = (x + y + z) / 3;
int ugly_mean = (((x + y) / 2) * 2 + z) / 3;
if (x == y) { return y; }
else { return z; }
}
int main() {
return 1;
}

View File

@@ -1,18 +0,0 @@
int int_greater_than(int i, unsigned int j) {
if (i > j) return 1;
else return 0;
}
int char_greater_than(char i, unsigned char j) {
if (i > j) return 1;
else return 0;
}
int main() {
// cmp ugt
int r1 = int_greater_than(-1, 1);
// cmp sgt
int r2 = char_greater_than(-1, 1);
return r1 == 1 && r2 == 0;
}

View File

@@ -1,11 +0,0 @@
int fibonacci(int n) {
if (n < 2) {
return n;
}
return fibonacci(n - 2) + fibonacci(n - 1);
}
int main() {
return fibonacci(9) == 34;
}

View File

@@ -1,5 +0,0 @@
int main()
{
int x = 1;
return 1;
}