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
114 stars 104 forks source link

Implement Roman Numeral Operation Calculator #656

Closed SakshiJSanghavi closed 10 months ago

SakshiJSanghavi commented 10 months ago

Issue Id you have worked upon -

590

Briefly explain your program logic -

The provided JavaScript code defines a React component for a Roman Numeral Operation Calculator. The component utilizes the useState hook to manage state variables, including the input Roman numerals (num1 and num2), the selected operation (operation), and the result of the operation (result). The main logic lies within the performOperation function, which is triggered when the user clicks the "Perform Operation" button. This function attempts to convert the input Roman numerals to Arabic numerals, performs the specified arithmetic operation, and then converts the result back to a Roman numeral. The program also handles potential errors, such as invalid Roman numerals or operations, displaying an error message if needed. The user interface is designed using Material-UI components, featuring input fields for numerals and the operation, a button to initiate the calculation, and a display area for the result. The code integrates the romanize library to facilitate the conversion between Roman and Arabic numerals, contributing to the overall functionality of the Roman Numeral Operation Calculator. State management in React ensures dynamic updates and responsiveness to user interactions.

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

image image image image


By raising this PR I affirm that -

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
calc-for-everything ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 6:33pm
SarthakKeshari commented 10 months ago

@SakshiJSanghavi, Node modules folder need not be pushed. Kindly look into it. And kindly revert the changes made to package.json and package-lock.json that lies outside calculators folder.

SakshiJSanghavi commented 10 months ago

I have revert back the changes in package.json and package-lock.json that lies outside calculators folder.

SarthakKeshari commented 10 months ago

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