Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed 22. Naming & Self Documenting Code, added local fmt
- Loading branch information
1 parent
9d2402f
commit 7693f1e
Showing
4 changed files
with
7,074 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
Oops, something went wrong.