import java.text.DecimalFormat; import java.util.Scanner; /** * Created by Administrator on 2017/11/12. */ public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); while (scan.hasNext()){ double r = scan.nextDouble(); DecimalFormat df = new DecimalFormat("#0.00"); System.out.println(df.format(Math.abs(r))); } } }
hdu_2003 求绝对值
最新推荐文章于 2020-12-01 18:50:19 发布