提交 e7f7dce3 编写于 作者: qq_39446688's avatar qq_39446688

Add new file

上级 c208e8ec
#include <stdio.h>
int main()
{
int n = 0;
scanf("%d", &n);
int a = 0;
int b = 0;
int c = 0;
int d = 0;
while (n >= 20) {
a = a + 1;
n = n - 20;
}
while (n >= 10) {
b = b + 1;
n = n - 10;
}
while (n >= 5) {
c = c + 1;
n = n - 5;
}
d = n;
printf("$20 bills: %d\n", a);
printf("$10 bills: %d\n", b);
printf("$5 bills: %d\n", c);
printf("$1 bills: %d", d);
return 0;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册