/*
Online Java - IDE, Code Editor, Compiler

Online Java is a quick and easy tool that helps you to build, compile, test your programs online.
*/

// This has no recursion.. Its permutation with replacement...

import java.math.*;
import java.util.*;

public class Permutation
{
    public static void main(String[] args) {
        System.out.println("Welcome to Online IDE!! Happy Coding :)");
        
        int n=2;
        int r =3;
        
        // n = objects
        // r = sample
        
        System.out.println("***PERMUTATIONS***(WITH REPLACEMENT)");
        
        System.out.println("PR(n,r) = nr");
        
        System.out.println(Permutations (n,r));
        
    }
    
    public static long Permutations (int n, int r)
    {
        
        System.out.println("P^R(" + n+","+r+") = " + "Math.pow(n,r)");
        return (long)Math.pow(n,r);
        
    }
}
        
    

