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 |
求助!!java 结果正确 怎么是waimport java.util.Scanner; public class Main { public static void main(String[] args) { Scanner getNumber = new Scanner(System.in); float n = getNumber.nextFloat(); for(int i=1;i<=n;i++){ int year=0; float x=getNumber.nextFloat(); float y=getNumber.nextFloat(); for(;3.14*((x*x)+(y*y))>(100*year);year++){ } System.out.println("property"+" "+i+":"+"This property will begin eroding in year "+year+"."); } System.out.println("END OF OUTPUT."); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator