Computer Science, asked by kanupriya163, 5 months ago

no spam otherwise will be reported​. you have to write a Java program which should be suitable for class 9 student. if you don't know, don't reply​

Attachments:

Answers

Answered by Rinni294
1

Answer:

//SMALLEST OF TWO INTEGERS

class Min

{

public static void main(String args[])

{

double x = 10;

double y = 24;

double A=Math.min(x,y);

System.out.println("A= "+A);

}

}

//Prg to find square root a number

import java.util.Scanner;

class SqRoot

{

public static void main(String args[])

{

System.out.println("Enter a number ");

Scanner K=new Scanner(System.in);

int N=K.nextInt();

double S=Math.sqrt(N);

System.out.println("Square root= "+S);

}

}

//Program to find cube root

class CubeRoot

{

public static void main

{

int N = 9;

double C=Math.cbrt(N);

System.out.println("Cube root= "+C);

}

}

Note:- If you are doing user input use scanner class like I have used in square root.

Thank You

Similar questions