From 0dae5e5646558f55798f9d8ca2e4ea040993a9c5 Mon Sep 17 00:00:00 2001 From: LuoJing <1327913887@qq.com> Date: Thu, 6 Aug 2020 21:16:54 +0800 Subject: [PATCH] jjcc.java --- jjcc.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 jjcc.java diff --git a/jjcc.java b/jjcc.java new file mode 100644 index 0000000..b1c1260 --- /dev/null +++ b/jjcc.java @@ -0,0 +1,28 @@ +package jjcc; +import java.sql.*; +public class jjcc { + //addition函数实现的是两个数x和y的加法运算 + public void addition(double x,double y) { + double result; + result=x+y; + System.out.println(x+"+"+y+"="+result); + } + //subtraction函数实现的是两个数x和y的减法运算 + public void subtraction(double x,double y) { + double result; + result=x-y; + System.out.println(x+"-"+y+"="+result); + } + //multiplication函数实现的是两个数x和y的乘法运算 + public void multiplication(double x,double y) { + double result; + result=x*y; + System.out.println(x+"*"+y+"="+result); + } + //division函数实现的是两个数x和y的除法运算 + public void division(double x,double y) { + double result; + result=x/y; + System.out.println(x+"/"+y+"="+result); + } +}