Advertisement
Guest User

Untitled

a guest
Oct 20th, 2021
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public class MyClass {
  2.     public static void main(String args[]) {
  3.      
  4.        
  5.         Scanner scan = new Scanner(System.in);
  6.        System.out.println("Unesite x");
  7.         int x=scan.nextInt();
  8.          System.out.println("Unesite n");
  9.         int n=scan.nextInt();
  10.        
  11.       double rezultat=(double)Math.pow(n,(double)1/x);
  12.  
  13.       System.out.println("Sum  = " + rezultat);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement