ADVANCE CALCULATOR WITH METHOD IN JAVA.
********************************
import java.unil.Scanner;
public class Advance_Calculator
{
public static int add(int num1, int num2)
{
int c= num1 + num2;
return c;
}
public static int subtract(int b, int d)
{
int c= a-d;
return c;
}
public static double multiply(int f, int k)
{
int c= f*k;
return c;
}
public static double divide(int st, int mt)
{
int c= st/mt;
return c;
}
public static double square(int p)
{
int c= p*p;
return c;
}
public static double cube(int q)
{
int c= q*q*q;
return c;
}
public static double squareroot(int t)
{
int c= math.sqrt(t);
return c;
}
public static double cuberoot(int v)
{
int c= math.cbrt(v);
return c;
}
}
***********************************
0 Comments