Skip to content

nazuhifu/countdown-assignment

Repository files navigation

20 Games

This project is a simple web application where users input four numbers, and the app finds possible mathematical solutions using the four basic arithmetic operations (addition, subtraction, multiplication, division) to reach the result of 20.

Features

  • User Input: Allows users to input four numbers.
  • Solution Finder: Calculates all possible solutions where the result equals 20 by applying different combinations of arithmetic operations.
  • Responsive Design: Uses Bootstrap for a responsive layout.
  • Real-time Results: Displays possible solutions immediately after submission.

Project Structure

  • index.html: The main HTML file that contains the structure of the web page.
  • styles/style.css: Custom CSS to style the page.
  • bootstrap/css/bootstrap.min.css: Bootstrap framework for responsive design.
  • script.js: JavaScript logic for calculating the solutions and updating the page.

How It Works

  1. The user inputs four numbers in the form fields.
  2. The JavaScript code calculates all possible expressions using the four numbers and the arithmetic operators (+, -, *, /).
  3. It evaluates each expression, and if the result equals 20, the solution is displayed on the page.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •