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

Trending Topics

Online now

Members online
1,086
Guests online
2,232
Total visitors
3,318

Forum statistics

Threads
2,332,503
Posts
29,265,740
Members
1,144,350
Latest member
yoshi12
Back
Top