| ||||||||||
| 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 | |||||||||
Re:错哪里错哪里错哪里???!!!In Reply To:错哪里错哪里错哪里???!!! Posted by:mervyn_diane at 2011-01-04 00:41:31 > #include<iostream>
>
> using namespace std;
>
> int main()
> {
> int N, M, P, C;
> cin >> N >> M >> P >> C;
>
> while( N + M + P + C != 0 )
> {
> if( P > M ) //The fake money given to the boss is lager.
> cout << C + N << endl;
> else // or, subtract the money the customer gived to.
> cout << N + P - M << endl;
> cin >> N >> M >> P >> C;
> }
>
> return 0;
> }
问题在哪里,去掉先前那个if就可以啊~?
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator