title: 求编一个java程序！ 
answer: import java.util.Scanner; public class TestFloat { public static void main(String[] args) { System.out.println("请输入： "); Scanner sca = new Scanner(System.in); float n = sca.nextFloat(); if(Math.abs(n)<1e-4) { System.out.println("n="+0); } System.out.println("n!="+0); } }