Computer Science, asked by shivanshukesarwani75, 8 months ago

write a program to input for "m" and "n" using mathematical method perform the foolowing operators in one program print m raised to the power n​

Answers

Answered by navylover2916
1

Answer:

import java.util.Scanner;

public class practise3 {

    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    System.out.println("ENTER THE VALUE OF 'm' ");

     double m = scan.nextDouble();

    System.out.println("ENTER THE VALUE OF 'n' ");

   double n = scan.nextDouble();

  double raised = Math.pow(m, n);

  double squareroot = Math.sqrt(m);

 double cuberoot = Math.cbrt(n);

 System.out.println("'m' RAISED TO THE POWER 'n' IS : "+raised);

  System.out.println("THE SQUARE ROOT OF 'm' IS :"+squareroot);

  System.out.println("THE CUBEROOT OF 'n' IS : "+cuberoot);

    }

}

Similar questions