Show this to your *nice* math teacher!
How this works
First you input the numerator and denominator of the fraction one by one. The program then calculates the HCF/GCD of the numerator and denominator and divides the numerator and denominator by that. The result is the simplified numerator and denominator. It is then outputted.
Note and Credits
How I got the help
Basically in the post "Show this to your mean math teacher" I asked how to create a fraction simplifier cause I had been stuck for a loooooong time. I got an answer from @fuzzyastrocat, @RohilPatel, and @maxyang. They really helped me by giving ideas, and so I got to finish this calculator.
I don't wanna ask you to upvote as it sounds like begging for cycles. But upvote if you liked this?
Go to https://repl.it/@BD103/Simplifier
Sorry if it's a bit confusing, I tried to add comments to explain what's happening. I ended up using PHP because you can create static links with it. I could possibly do JS, but that would mean rewriting it again! Have a good rest of your day, @Whippingdot
You should learn HTML, CSS, and JS as a combo. They are all necessary for making websites. Next, you don't really need to learn C++ because Python has more support and libraries and is easier, but you can if you want. You don't need to learn PHP. I used PHP because then I could give you a link to a fraction solution. You can use JS to get the content of the text box and create a variable from that. I used the
<label> tag because it was inside a
<form> tag. I'm sure
<p> would have worked too. :)
Last, do you want me to make a JS version of this? @Whippingdot
Ummmm....If you have the time you can make a JS version? I don't want to waste your time. And yes, I am learning HTML, CSS, and JS as a combo. Right now I am in HTML, and after that CSS. I am learning C++ cause I wanna do game dev in the future. C++ takes less run time then Python so it is more used for game dev. C++ and C# are the most popular in the game dev space. @BD103
Sorry for not answering your question. PHP is basically a plugin to HTML, you insert the PHP code into an HTML file, but make the extension
.php so the webserver knows to run the specific code. You also have to keep in mind that if you use PHP to select the PHP Web Server language from repl.it. But I guess that's not the point. Check out w3schools' tutorial for more information, but if you don't plan on using it then that's fine! I'll make the JS version :) @Whippingdot