From 751af44b3d60ce15a7d7f8d05485dbc086c969b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E9=87=91=E6=B2=B3?= <1262113654@qq.com> Date: Thu, 6 Aug 2020 20:59:46 +0800 Subject: [PATCH] jjcc.java --- jjcc.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 jjcc.java diff --git a/jjcc.java b/jjcc.java new file mode 100644 index 0000000..1422948 --- /dev/null +++ b/jjcc.java @@ -0,0 +1,26 @@ + +public class jjcc { + public static void main(String[] args) + { + System.out.println(add(1,2)); + System.out.println(sub(1,2)); + System.out.println(mul(1,2)); + System.out.println(div(1,2)); + } + public static double add(double a,double b) + { + return a+b; + } + public static double sub(double a,double b) + { + return a-b; + } + public static double mul(double a,double b) + { + return a*b; + } + public static double div(double a,double b) + { + return (double)a/b; + } +}