//https://csprograms4u.blogspot.com/
//Chapter 1
//Program 12
//Use of Power
Function in Java
import
java.util.Scanner;
public
class Power_Function
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
double x,y,z;
System.out.println("Enter
Base");
x=sc.nextDouble();
System.out.println("Enter
Power");
y=sc.nextDouble();
z=Math.pow(x,y);
System.out.println(x+" raise to
power "+y+ " is="+z);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.