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

Trending Topics

Online now

Members online
981
Guests online
6,406
Total visitors
7,387

Forum statistics

Threads
2,354,391
Posts
29,383,483
Members
1,079,440
Latest member
Rubykesha
Back
Top