| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
一道水题,实现了我的一百道!#include"iostream"
using namespace std;
int main()
{
int n,num=0;
cin>>n;
while(n--)
{
num++;
int money;
cin>>money;
int a,b,c,d;
a=money/25;
money=money%25;
b=money/10;
money=money%10;
c=money/5;
money=money%5;
d=money/1;
cout<<num<<" "<<a<<" QUARTER(S), "<<b<<" DIME(S), "<<c<<" NICKEL(S), "<<d<<" PENNY(S)"<<endl;
}
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator