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

Re:这段代码有问题吗?

Posted by crazyb0y at 2007-07-31 10:02:23 on Problem 3085
In Reply To:这段代码有问题吗? Posted by:stoundmire at 2007-07-31 09:17:29
> #include<stdio.h>
> int main()
> {
>     int tc,t;
>     scanf("%d",&tc);
>     for(t=1;t<=tc;t++)
>     {
>         int cent;
>         int q,d,n,p;
>         scanf("%d",&cent;);
>         q=cent/25;cent%=25;
>         d=cent/10;cent%=10;
>         n=cent/5;cent%=5;
>         p=cent;
>         printf("%d %d QUARTER(S), %d DIME(S), %d NICKLE(S), %d PENNY(S)\n",
                                                   ^^^^^^^
>                 t,q,d,n,p);
>     }
>     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