关闭

zoj2772

259人阅读 评论(0) 收藏 举报
分类:
#include <iostream>
using namespace std;

int main()
{
	int N, money, temp, Case = 0;
	cin >> N;
	while (N--)
	{
		cin >> money;
		cout << ++Case << " ";
		temp = money / 25;
		cout << temp << " QUARTER(S), ";
		money = money % 25;
		temp = money / 10;
		cout << temp << " DIME(S), ";
		money = money % 10;
		temp = money / 5;
		cout << temp << " NICKEL(S), ";
		money = money % 5;
		cout << money << " PENNY(S)";
		cout << endl;
	}
	return 0;
}

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:12831次
    • 积分:483
    • 等级:
    • 排名:千里之外
    • 原创:37篇
    • 转载:3篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档