diff --git a/code_study/Baekjoon/c/10101.c b/code_study/Baekjoon/c/10101.c new file mode 100644 index 0000000..0b927eb --- /dev/null +++ b/code_study/Baekjoon/c/10101.c @@ -0,0 +1,21 @@ +#include + +int main() { + int a, b, c, sum=0; + scanf("%d %d %d",&a,&b,&c); + sum = a + b + c; + if(sum!=180) { + printf("Error\n"); + } + else if(a==b && a==c) { + printf("Equilateral\n"); + } + else if(a==b || a==c || b==c) { + printf("Isosceles\n"); + } + else { + printf("Scalene\n"); + } + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/1085.c b/code_study/Baekjoon/c/1085.c new file mode 100644 index 0000000..6992e59 --- /dev/null +++ b/code_study/Baekjoon/c/1085.c @@ -0,0 +1,11 @@ +#include + +int main() { + int x,y,w,h,i,j; + scanf("%d %d %d %d",&x,&y, &w, &h); + i = (w-x) < x ? (w-x) : x; + j = (h-y) < y ? (h-y) : y; + printf("%d\n", i + +int main() { + int arr[3], max=0, sum=0; + for(int i=0; i<3; i++) { + scanf("%d",&arr[i]); + if(maxmax) printf("%d\n",sum+max); + else printf("%d\n",2 * sum - 1); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/15894.c b/code_study/Baekjoon/c/15894.c new file mode 100644 index 0000000..5b8e51a --- /dev/null +++ b/code_study/Baekjoon/c/15894.c @@ -0,0 +1,9 @@ +#include + +int main() { + long long n; + scanf("%lld",&n); + printf("%lld", 4*n); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/27323.c b/code_study/Baekjoon/c/27323.c new file mode 100644 index 0000000..a42fef9 --- /dev/null +++ b/code_study/Baekjoon/c/27323.c @@ -0,0 +1,9 @@ +#include + +int main() { + int a, b; + scanf("%d %d",&a, &b); + printf("%d",a*b); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/3009.c b/code_study/Baekjoon/c/3009.c new file mode 100644 index 0000000..f3baa7e --- /dev/null +++ b/code_study/Baekjoon/c/3009.c @@ -0,0 +1,14 @@ +#include + +int main() { + int x=0, y=0, a, b; + for(int i=0; i<3; i++) { + scanf("%d %d", &a, &b); + x ^=a; + y ^=b; + } + + printf("%d %d\n",x, y); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/5073.c b/code_study/Baekjoon/c/5073.c new file mode 100644 index 0000000..09e7c17 --- /dev/null +++ b/code_study/Baekjoon/c/5073.c @@ -0,0 +1,37 @@ +#include + +int main() { + int arr[3] = {1, 1, 1}; + while(1) { + int max = 0, sum = 0, isTri; + for(int i=0; i<3; i++) { + scanf("%d",&arr[i]); + sum += arr[i]; + if(max max ? 1 : 0; + + if(isTri) { + if(arr[0]==arr[1] && arr[1]==arr[2]) { + printf("Equilateral\n"); + } + else if(arr[0]==arr[1] || arr[0]==arr[2] || arr[1]==arr[2]) { + printf("Isosceles\n"); + } + else { + printf("Scalene\n"); + } + } + else { + printf("Invalid\n"); + } + } + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/9063.c b/code_study/Baekjoon/c/9063.c new file mode 100644 index 0000000..139b36c --- /dev/null +++ b/code_study/Baekjoon/c/9063.c @@ -0,0 +1,20 @@ +#include + +int main() { + int n, x, y, min_x, min_y, max_x, max_y; + scanf("%d",&n); + scanf("%d %d",&min_x,&min_y); + max_x = min_x; + max_y = min_y; + for(int i=0; ix ? max_x : x; + min_y = min_yy ? max_y : y; + } + + printf("%d", (max_x-min_x)*(max_y-min_y)); + + return 0; +} \ No newline at end of file