Skip to content

CodeByG14/java-assignment-cu

Repository files navigation

Java Practice Problems

This repository contains solutions to various Java programming problems, covering both basic programming concepts and recursive algorithms.

📚 Problems Solved

Part A: Short Coding Tasks

1. Even or Odd Checker

  • File: evenorodd.java
  • Description: Function to check if a given number is even or odd

2. Square of a Number

  • File: squareOfNumber.java
  • Description: Function that takes a number and returns its square

3. Sum of First N Natural Numbers

  • File: sumofNaturalNumbers.java
  • Description: Function to calculate the sum of first N natural numbers

4. Largest of Three Numbers

  • File: largestnumber.java
  • Description: Function to find the largest among three given numbers

5. Prime Number Checker

  • File: findprime.java
  • Description: Function to check if a given number is prime

Part B: Recursive Functions

6. Factorial Calculation

  • File: factorial.java
  • Description: Recursive function to calculate factorial of N

7. Fibonacci Series Generator

  • File: fibonacci.java
  • Description: Recursive function to generate Fibonacci series up to N terms

8. Sum of Digits

  • File: sumofdigits.java
  • Description: Recursive function to find the sum of digits of a number

9. Power Calculation

  • File: recursionforpower.java
  • Description: Recursive function to calculate power (a^b)

10. String Reversal

  • File: reversestring.java
  • Description: Recursive function to reverse a string

🛠️ Technologies Used

  • Language: Java
  • Environment: Linux (Arch Linux)
  • Development: Command-line compilation and execution

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages