| ||||||||||
| 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 | |||||||||
为什么GCC就AC,C++就WA了呢?(代码)请各位高手帮忙指点指点.谢谢#include<stdio.h>
void main()
{
double c,a,b,m,d,p,t,max,min;
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
while(a!=0&&b!=0&&c!=0&&d!=0)
{
if(c<d){max=d;min=c;}else {max=c;min=d;}
if(a<b){t=a;a=b;b=t;}
m=b;b=max*b/a;
if(b<=min)p=100*b/m;
else {b=min;p=100*b/m;}
if(p<=1.0)p=1.0;
if(p>=100.0)p=100.0;
printf("%d%c\n",(int)p,'%');
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator