Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

直接水过了!!! 没有贪心!

Posted by 810974380 at 2009-08-03 16:49:36 on Problem 3085
#include <stdio.h> 
int main()
{int a,b,c,d,e,x,n;
 scanf("%d",&n);
 while(n--)
 {scanf("%d",&a);
  x=a;
  b=x/25;x%=25;
  c=x/10;x%=10;
  d=x/5; x%=5;
  e=x/1;
  printf("%d %d QUARTER(S), %d DIME(S), %d NICKEL(S), %d PENNY(S)\n",a,b,c,d,e);
 }
 return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator