• The video above does not have the last few calculators and is an older version of code. This is a video of a newer version.

Inspiration

Something we both always struggled with was finding prime numbers since there is no formula that magically gives you a prime number, so we made a calculator about this (starting on April 21, at around 1 PM) and we decided to expand it and add more and more calculators

What it does

There is a main menu with 8 different calculators. Here is a list of the calculators:

  1. Prime Calculator - A calculator that outputs all primes less than the inputted number. Outputs surprisingly fast! (prints out about 56000 primes a second)

  2. Prime Test - A test to see if a number is prime. This calculator also works with up to 1.8 * 10 ^19, which is something I am really proud of. However, it may take a couple of seconds, since the number is huge.

  3. Factor Calculator - A calculator that outputs all the factors of an inputted number.

  4. Simple Interest Calculator - This calculator basically multiplies three numbers together, but it helps people that are confused with interest. Also, this program can deal with super big outputs, up to 1.8 * 10 ^ 19 because of our huge data structures.

  5. Compound Interest Calculator - This calculator is more formula like, so it's purpose is more for just Compound interest. This program can't deal too huge numbers, as it uses exponentials, so the numbers grow big really quickly.

  6. Average Calculator - Calculates the average of a group of numbers.

  7. Mean Absolute Deviation (MAD) Calculator - Calculates the average distance from each number in a group of numbers to their average. The smaller the MAD, the closer the numbers are.

  8. Area of Polygons Calculator - Calculates the area of a polygon given the number of vertices and the coordinates of each vertex.

How I built it

We used a live share on a platform called Visual Studio Code by Microsoft, where we could write on the same document at the same, like google Doc. We worked together, added more and more calculators as time went on, and eventually came to this final product, which we hope you like!

Challenges I ran into

The first challenge that I ran into was joining the first live share on Visual Studio Code. I tried a number of things and kept on having to repeatedly signing in to the share and finding out that my token to sign in had expired (this was for 3 hours). Once we finally got that to work, we tried to come up with ideas that we could do for this program. That was another challenge because I wanted our project to fit one of the themes. The final challenge was submitting it. We did not coordinate well on this and on the last minute (before I go to bed) I am recording a video of it working (I made a Github repository beforehand after we finished the code) and I think that it was really a challenge to get in touch with Raymond and figure this out. Also, I have never used Github before so I don't really know how to run the code there but I hope that the link that I have provided is fine. :)

Accomplishments that I'm proud of

This was my first actual code with C++ and I think I did well learning it in 5 days. I am proud of our finished product because Raymond and I found a way to make it entertaining and educational at the same time. I also learned how to use more complicated functions and such along the way. Also, I'm really proud of how well our program actually turned out. We went long paths to make this as errorless as possible, including using as the biggest data type, unsigned long long, which I have never used before.

What I learned

I learned that we should plan ahead everything that we are gonna do, from starting the code to submitting it. Especially submitting it. I also learned basic loops in C++ and learned new libraries. I really enjoyed this hackathon because I learned a lot and had fun at the same time.

What's next for The Calculatorium

I don't know, as this was for a hackathon. I (if Raymond doesn't want to) might continue to add more calculators in a project called Calculatorium V2, but we will not change the original. Also, if you find any more bugs, please enter them in the feedback section. We'd love to see how we could improve!

Built With

  • c++
  • cmath>
  • cstlib>
  • iostream>
  • stdio.h>
  • string>
  • unistd.h>
  • visual-studio-code
  • windows.h>
Share this project:

Updates

posted an update

The code did not copy and paste correctly so no calculators 6,7,8 :( Sorry about that, and please ignore the update by Raymond below. Sadly, the deadline for changing has ended and we cannot change this anymore.

Log in or sign up for Devpost to join the conversation.