A touch more on the Want Cake? Program

󰃭 13/04/2020

So here is the end goal for this project, and I know I am miles away from achieving it, but it’s basically going to act as if it’s a shop. Already this concept is starting to take shape, as you can see with the code below. What it’s lacking is overall functionality, so I need to define what are acceptable choices and what are not, so the end-user can’t just type anything that makes no sense with the output. For example, when it asks, “What cake do you want?” you can pretty much enter anything, and it will respond with, “That’s a good choice!” However, I need this program to only say that if it is actually a defined cake. If not, it will say, “Sorry, we don’t have that,” or something to that effect. The same goes for the drink option. Now the program will restart from the beginning. I will be adding an “Is that everything? Yes/No” option. Then, you can either choose Yes, which will say, “Thank you for shopping…” or No, which will ask you what else you would like. This started off as a simple “How many cakes do you want?” and has now become an idea of what I actually want it to do.

Continue reading


By the power of

󰃭 01/04/2020

This code will take two numeric values you enter and will then find the power of them. So, if you enter 5 and then 7, you will get the answer to 5 raised to the power of 7. Spoiler Alert: it’s 78125, lol.

#include <iostream>
#include <cmath>
#include <string>

int main() {
    double base, exponent;
    std::string input1 = "What is the first value? ";
    std::string input2 = "What is the second value? ";
   
    std::cout << input1;
    std::cin >> base;
    if (base <= 1) {
        std::cout << "A bigger number next time please!\n";
    }
    std::cout << input2;
    std::cin >> exponent;
    double power = pow(base, exponent);
    
    for (int c = 0; c < 10; c++) {
        std::cout << power << "\n";
    }
}

Continue reading


󰃭 01/01/0001

Saving the content to a .txt file as requested.

content = """

title: “The unnecessary hard game now on GitHub” date: 2020-05-09 categories:

  • GitHub
  • Hard game
  • Programs
  • release
  • UHGame
  • Unnecessary hard game

You can now download Unnecessary hard game straight from GitHub but as normal I have added the source code to below this post as it was updated today. The official release of this is now called UHGame.

Download GitHub Version

Continue reading