| ||||||||||
| 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 | |||||||||
菜鸟写了25题,55555~~,都是水过来的!!#include<stdio.h>
void main()
{
int a,b,c,d,t;
while(scanf("%d%d%d%d",&a,&b,&c,&d),a!=0){
if(a<b)
{
t=a;
a=b;
b=t;
}
if(c<d)
{
t=c;
c=d;
d=t;
}
printf("%f %f\n",100*1.0*c/a,100*1.0*d/b);
a=(int)100*1.0*c/a;
b=(int)100*1.0*d/b;
t= (a<=b?a:b);
if(t>100)
t=100;
printf("%d%%\n",t);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator