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

菜鸟写了25题,55555~~,都是水过来的!!

Posted by 12619 at 2009-07-24 10:30:25 on Problem 2707
#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:
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