🔒 Closed HELP JAVA PO

Status
Not open for further replies.
Any number to any power

Java:
import java.util.Scanner;
public class Program {

    public static void main(String[] args) {
        double x;
        double y;
        Scanner sc = new Scanner(System.in);
        x = sc.nextDouble();
        y = sc.nextDouble();
        System.out.println(x + "^" + y + " is:");
        System.out.println(Math.pow(x,y));
    }
}

Next time pagmeh activities ka sa programming make sure at least aralin mo muna, try to code, then if meh error chaka mo dito ipost.
 
Status
Not open for further replies.

About this Thread

  • 6
    Replies
  • 400
    Views
  • 6
    Participants
Last reply from:
Tikol4Life

Trending Topics

Online now

Members online
466
Guests online
2,871
Total visitors
3,337

Forum statistics

Threads
2,308,048
Posts
29,182,756
Members
1,192,774
Latest member
Taufik1738
Back
Top