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); + } +}