Skip to content

This repository contains various Java programs to solve common programming problems. Each program focuses on basic control structures, conditional statements, and mathematical computations.

Notifications You must be signed in to change notification settings

PPreetiparnaDas/Java-Programming-Exercises

Repository files navigation

Java Programming Exercises

This repository contains various Java programs to solve common programming problems. Each program focuses on basic control structures, conditional statements, and mathematical computations.

Description

This repository includes solutions for:

  • Weekday identification based on week number
  • Month days calculator
  • Currency note counter
  • Triangle validation and classification
  • Quadratic equation solver
  • Profit/Loss calculation
  • Temperature conversion
  • Number sign checking

These programs are useful for beginners practicing Java programming.

Table of Contents

Installation

  1. Clone this repository:
    git clone https://github.com/your-username/java-programs.git
  2. Open the project in any Java-supported IDE (Eclipse, IntelliJ, VS Code, etc.).
  3. Compile and run the Java files as needed.

Usage

Each program is self-contained and can be run individually. Example:

javac Weekday.java
java Weekday

Programs

Program Description
Weekday.java Inputs a week number (1-7) and prints the corresponding day
MonthDays.java Inputs a month number (1-12) and prints the number of days
CountNotes.java Counts the total number of notes in a given amount
TriangleValidityByAngles.java Checks if a triangle is valid using angles
TriangleValidityBySides.java Checks if a triangle is valid using sides
TriangleType.java Identifies if a triangle is equilateral, isosceles, or scalene
QuadraticEquation.java Finds the roots of a quadratic equation
ProfitLoss.java Determines profit or loss based on cost and selling price
TemperatureConverter.java Converts temperature between Fahrenheit and Celsius
CheckSign.java Determines if a number is positive, negative, or zero

License

This project is licensed under the MIT License. Feel free to use and modify as needed.


Contribute

Feel free to fork this repository and submit pull requests with improvements or additional programs!

Happy Coding! 🚀

About

This repository contains various Java programs to solve common programming problems. Each program focuses on basic control structures, conditional statements, and mathematical computations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages