├── README.md ├── java └── python /README.md: -------------------------------------------------------------------------------- 1 | # Code-Challenges-Repository -------------------------------------------------------------------------------- /java: -------------------------------------------------------------------------------- 1 | // Example code for various tasks in Java 2 | public class Main { 3 | public static void main(String[] args) { 4 | System.out.println("Factorial of 5: " + factorial(5)); 5 | } 6 | 7 | static int factorial(int n) { 8 | if (n == 0) 9 | return 1; 10 | else 11 | return n * factorial(n-1); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /python: -------------------------------------------------------------------------------- 1 | # Example code for various tasks in Python 2 | def factorial(n): 3 | if n == 0: 4 | return 1 5 | else: 6 | return n * factorial(n-1) 7 | 8 | print("Factorial of 5:", factorial(5)) 9 | --------------------------------------------------------------------------------