Last active
December 16, 2015 12:29
-
-
Save sooop/5434784 to your computer and use it in GitHub Desktop.
생활코딩
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 생코 두 번째 문제. | |
#import <Foundation/Foundation.h> | |
int main(int argc, char const *argv[]) | |
{ | |
int a, c1, c5, c10, c50, c100, c500; | |
scanf("%d", &a); | |
c500 = a / 500; a = a % 500; | |
c100 = a / 100; a = a % 100; | |
c50 = a / 50; a = a % 50; | |
c10 = a / 10; a = a % 10; | |
c5 = a / 5; c1 = a % 5; | |
printf("%d\n", c1+c5+c10+c50+c100+c500); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
줄 맞추기가 예술이네요. ㅎㅎ