SarthakKeshari / calc_for_everything

This repository aims to provide Calculators for educational, professional, scientific, health and well-being and other purposes.
https://calc-for-everything-psi.vercel.app
MIT License
113 stars 103 forks source link

create tATCalc #549

Closed WaterCubeGod closed 10 months ago

WaterCubeGod commented 10 months ago

Issue Id you have worked upon -

Issue: #524

Briefly explain your program logic -

This program is a React component that serves as a Turnaround Time (TAT) calculator. Here's a concise explanation of what the code does:

  1. It defines state variables to manage input and results.
  2. Users can input the number of processes and their arrival/completion times.
  3. When the "Calculate TAT" button is clicked, it sorts processes by arrival time and calculates TAT values.
  4. The program handles invalid input (negative or non-numeric values).
  5. It displays TAT values, total TAT, and average TAT.
  6. If input is invalid or no processes are entered, it shows an appropriate error message.

Screenshots(Attach 2 screenshots of your own input and output) -

Snipaste_2023-10-29_14-53-17


Snipaste_2023-10-29_14-55-28


Snipaste_2023-10-29_14-55-34

By raising this PR I affirm that -

SarthakKeshari commented 10 months ago

Congratulations 🎉 @WaterCubeGod on your contribution. Thanks for adding value to this repository. 😊

Let's celebrate this fest 😃 by providing more developers 👨‍💻👩‍💻 an opportunity to contribute. Help us make this repository reach far and more by sharing this to your friends and colleagues.

Your efforts can make difference.

SarthakKeshari commented 10 months ago

Hey 👋, may you also encourage us by clicking the star icon on the repository main page. ⭐

image