#include <stdio.h>
int main()
{
int price, person;
printf("%d명이 각각 %d원씩 지불" person
-1, price
/ person
); printf(", 1명 %d원 지불", price
- (price
/person
)*(person
-1)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewoJaW50IHByaWNlLCBwZXJzb247CglwcmludGYoIuy0nSDquIjslaEgOiAiKTsKCXNjYW5mKCIlZCIsICZwcmljZSk7CglwcmludGYoIuy0nSDsnbjsm5AgOiAiKTsKCXNjYW5mKCIlZCIsICZwZXJzb24pOwoJcHJpbnRmKCIlZOuqheydtCDqsIHqsIEgJWTsm5DslKkg7KeA67aIIiBwZXJzb24tMSwgcHJpY2UgLyBwZXJzb24pOwoJcHJpbnRmKCIsIDHrqoUgJWTsm5Ag7KeA67aIIiwgcHJpY2UgLSAocHJpY2UvcGVyc29uKSoocGVyc29uLTEpKTsKCXJldHVybiAwOwp9Cg==
prog.c: In function ‘main’:
prog.c:9:43: error: expected ‘)’ before ‘person’
printf("%d명이 각각 %d원씩 지불" person-1, price / person);
^~~~~~
prog.c:9:11: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
printf("%d명이 각각 %d원씩 지불" person-1, price / person);
^
prog.c:9:27: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
printf("%d명이 각각 %d원씩 지불" person-1, price / person);
^