A simplified blackjack game played in a console window. This project is from a Mike Dawson book, so the source code is not 100% original. But with a few personal tweaks and some tidy-ups, the program is quite fun when you're bored. Very very basic AI, which tells the computer when it's a good idea to hit, and when it's a good idea to decide if an Ace is valued as 1 or 11.
A very basic multiplication table former. It asks you to enter a number, then displays a 5x5 grid-like multiplication table with the base number you entered. It starts from 1. Useful for teaching younger kids their times tables, or people who aren't so good with multiplication. You can use it from the command line, I would recommend maximizing your screen when using big numbers. Command line usage: Windows:..
old game I wrote. This was probably the first or second game I wrote using random numbers and enumerated types. The computer picks a number, and you try to guess it. Very basic and simple, but it was a beginner project. Now, looking back, I could think of a million ways to rewrite this game, with 100 more features and far more memory efficient. This is just an example code, all in all. So, if you..
@jsg55 While I'm not a beginner to the language, I am still "learning". But, stronger codes that I do implement, like encryption key generators (in which I do use this function), I don't post. As I do not want it to be public code. I will post small/medium sized codes that will aide people in developing diverse and somewhat simliar codes. A lot of people just don't understand the use of prime numbers, or even more simplistic mathematical factions.
@bielle It's useful if you're using it inline. It's not meant to return the prime number.
@ssimar If you're going to reply with a blatant, and disrespectful comment, don't bother leaving one.
A very useful resource in finding prime numbers is stronger encryption. As there are only so many factors when multiiplying them. When multiplying two prime numbers together instead of any two ordinary numbers, there are only four factors, making the encryption key stronger, which makes it harder to crack.