|
|
|
|
复制本帖HTML代码
|
高亮:
今天贴
X 昨天贴
X 前天贴
X |
import java.io.*;
import java.util.*;
import java.text.NumberFormat;
class Q4 {
//main class
public static void main(String []args) throws Exception{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
String thisLine;
StringTokenizer st;
double a, b;
boolean blank = false;
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
nf.setMinimumFractionDigits(2);
while((thisLine=stdin.readLine())!=null){
st = new StringTokenizer(thisLine);
a = Double.parseDouble(st.nextToken());
b = Double.parseDouble(st.nextToken());
if (blank)
System.out.print(" ");
else
blank = true;
System.out.print(nf.format(a/b));
}
System.out.println();
}
}.
|
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法! |
我爬~~~~~
|
|