Write a program to input values for ‘m’ and ‘n’ and using mathematical method perform the
following operations in one program:
(i) Print m raised to the power n [i.e. mn
]
(ii) Print the square root of m.
(iii) Print the cube root of n.
Answers
Answered by
8
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);
}
}
Answered by
0
Answer:
hope it is correct and it helps you
Answered by
0
Answer:
hope it is correct and it helps you
Attachments:
Similar questions
Science,
3 months ago
English,
3 months ago
History,
3 months ago
India Languages,
6 months ago
Math,
6 months ago
Social Sciences,
10 months ago
Psychology,
10 months ago