Skip to content

Commit

Permalink
Completed 22. Naming & Self Documenting Code, added local fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RunninglVlan committed Sep 8, 2020
1 parent 9d2402f commit 7693f1e
Show file tree
Hide file tree
Showing 4 changed files with 7,074 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 02-TripleX/TripleX.cpp
@@ -1,9 +1,19 @@
#define FMT_HEADER_ONLY

#include <iostream>
#include "fmt/format.h"

int main()
{
std::cout << "You are a secret agent breaking into a secure server room..." << std::endl;
std::cout << "Enter the correct code in the form of `X X X` (where X is a number) to continue..." << std::endl;

const int CodeA = 2, CodeB = 3, CodeC = 4;
const int CodeSum = CodeA + CodeB + CodeC;
const int CodeProduct = CodeA * CodeB * CodeC;
std::cout << "+ There are 3 numbers in the code" << std::endl;
std::cout << fmt::format("+ The codes add-up to: {}", CodeSum) << std::endl;
std::cout << fmt::format("+ The codes multiply to give: {}", CodeProduct) << std::endl;

return 0;
}

0 comments on commit 7693f1e

Please sign in to comment.