algorithm/dimigo.goorm.io
연산자 - 연산자의 활용 예제3
m0nd2y
2018. 7. 5. 20:18
Practice Contents
현재 1달러 환율은 1071원이다. 즉, 1달러 = 1071원
K군이 가지고 있는 원 단위의 돈의 액수를 입력하면 몇 달러 몇센트인지 출력하는 프로그램을 작성하시오.
(1달러 = 100센트)
⋇ Please keep the input/output format well.
#include <stdio.h>
int main() {
int a;
scanf("%d",&a);
printf("%d달러 %d센트",a/1071,a*100/1071%100);
}