반응형
jungol 521부터 jungol 530까지 c언어로 작성된 코드입니다.
참고해 주시면 좋을 것 같습니다.
jungol 521
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
int c;
scanf("%d %d", &a, &b);
printf("%d %d ", ++a, --b);
c = (a - 1) * b;
printf("%d", c);
return 0;
}
jungol 522
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
printf("%d \n%d", a == b, a != b);
return 0;
}
jungol 523
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
printf("%d > %d --- %d\n", a, b, a>b);
printf("%d < %d --- %d\n", a, b, a < b);
printf("%d >= %d --- %d\n", a, b, a >= b);
printf("%d <= %d --- %d\n", a, b, a <= b);
return 0;
}
jungol 524
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
printf("%d %d", a && b, a || b);
return 0;
}
jungol 525
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
int c;
scanf("%d %d %d", &a, &b, &c);
printf("%d %d", (a>b)&&(a>c), (a==b)&&(a==c));
return 0;
}
jungol 526
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
int e;
int f;
double c;
double d;
scanf("%lf %lf", &c, &d);
a = c * d;
e = c;
f = d;
printf("%d %d", a, e*f);
return 0;
}
jungol 527
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
float c;
scanf("%d %d", &a, &b);
c = a;
printf("%d %.2f\n", a/b, c/b);
return 0;
}
jungol 528
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
scanf("%d", &a);
printf("%d\n", a);
if (a < 0)
{
printf("minus");
}
return 0;
}
jungol 529
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
int b;
int standard;
scanf("%d %d", &a, &b);
standard = b + 100 - a;
printf("%d\n", standard);
if (standard > 0)
{
printf("Obesity");
}
return 0;
}
jungol 530
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int a;
scanf("%d", &a);
if (a >= 20)
{
printf("adult");
}
else
{
printf("%d years later", 20-a);
}
return 0;
}
반응형
'Algorithm > JUNGOL' 카테고리의 다른 글
C언어, JUNGOL 9031 ~ 9040 (0) | 2023.11.08 |
---|---|
C언어, JUNGOL 121 ~ 130 (0) | 2023.11.07 |
C언어, JUNGOL 9021 ~ 9030 (0) | 2023.11.05 |
C언어, JUNGOL 111 ~ 120 (2) | 2023.11.04 |
C언어, JUNGOL 511 ~ 520 (0) | 2023.11.03 |