You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
769 B

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author dell
*/
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;
}
}