-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathW5_DrawCode5.c
More file actions
42 lines (37 loc) · 934 Bytes
/
W5_DrawCode5.c
File metadata and controls
42 lines (37 loc) · 934 Bytes
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
#include <stdio.h>
void main()
{
//1
int student_price=1000;
int adult_price=5000;
int student=15;
int adult=2;
int stu_all=student*student_price;
int adu_all=adult*adult_price;
int paragon1=stu_all<adu_all;
printf("%d\n",paragon1);
//2
int A_truck=1000;
int B_truck=1000;
int A_brick_kg=1;
int B_brick_kg=3;
int A_brick=A_truck/A_brick_kg;
int B_brick=B_truck/B_brick_kg;
int paragon2=A_brick-B_brick==0;
printf("%d\n",paragon2);
//3
int money1 = 5000;
int pencil = 500;
int note = 1000;
printf("%d\n", money1 >= pencil * 5 + note * 2);
//4
int money2=15000;
int egg=2000;
int shrimp=3000;
int salmon=4000;
int tuna=5000;
int last_money=money2-egg-shrimp-salmon;
int okno=last_money-tuna>0 || last_money-tuna-tuna>0;
printf("%d",okno);
}
//W5_DrawCode5 4.다음 문장의 결론이 맞으면 1, 틀리면 0을 출력하는 프로그램을 작성해 봅시다.