๐Ÿ”’ Closed HELP JAVA PO

Status
Not open for further replies.
using loop pano po ito
 

Attachments

  • Slide2(3).webp
    Slide2(3).webp
    38.5 KB · Views: 24
  • Slide2(3).webp
    Slide2(3).webp
    38.5 KB · Views: 17
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
  • 378
    Views
  • 6
    Participants
Last reply from:
Tikol4Life

Online now

Members online
289
Guests online
720
Total visitors
1,009

Forum statistics

Threads
2,276,902
Posts
28,972,972
Members
1,230,602
Latest member
mamwielder
Back
Top