🔒 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
  • 395
    Views
  • 6
    Participants
Last reply from:
Tikol4Life

Trending Topics

Online now

Members online
1,075
Guests online
1,530
Total visitors
2,605

Forum statistics

Threads
2,290,145
Posts
29,062,852
Members
1,212,243
Latest member
wnkrb
Back
Top