Skip to content

abderrahim1210/speed-calculator

Repository files navigation

🏎️ Speed Calculator (JavaScript)

A simple web application to calculate speed using JavaScript, HTML, and CSS. The user inputs distance and time, and the app calculates and displays the speed instantly.

🚀 Features

- Calculates speed using the formula:  
  **Speed = Distance ÷ Time**
- Simple and user-friendly interface
- Input validation
- Support for different units (e.g., km/h, m/s)

🛠️ Technologies Used

- HTML5
- CSS3
- JavaScript (Vanilla)

📸 Screenshots

> *(Add screenshots of the interface here if available)*

📦 How to Use

1. **Download or Clone the Project**  
   Download the files or clone the repository to your local machine.

2. **Open `index.html`** in your web browser.

3. **Enter Data**  
   - Enter the distance (e.g., 100 km)
   - Enter the time (e.g., 2 hours)
   - Click the "Calculate Speed" button

4. **View Result**  
   The calculated speed will be displayed below the form.

📝 Example

If you input:
- **Distance:** 150 km  
- **Time:** 3 hours  

The result will be:  
**Speed = 50 km/h**

📁 Project Structure

speed-calculator/
├── speed-calculator.html
├── speed-calculator.css
└── speed-calculator.js

📌 Notes

- Make sure to input valid numbers for both distance and time.
- Speed cannot be calculated if time is zero.

🧑‍💻 Developer

- **Name:** *(Abderrahim)*
- **GitHub:** (https://github.com/abderrahim1210)

📄 License

This project is open source and available under the MIT License.