C++ Library Extensions 2022.12.09
To help learn modern C++ programming
000-permutation.cpp
Go to the documentation of this file.
1#include <tpf_ncrnpr.hpp>
2#include <tpf_output.hpp>
3
5{
6 using namespace tpf::ncrnpr;
7 using namespace tpf::output;
8
9 tpf::console cout;
10 auto nl = tpf::output::nl();
11
13
14 m_th_t n;
15 cout << "input n: "; std::cin >> n;
16
17 auto n_p_r = npr(n, n);
18
19 cout << "Computing ... " << n_p_r << " permutations!" << nl;
20 for(m_th_t i = 0; i <= n_p_r; ++i)
21 {
22
23 // enum_permutation((m_th_t)12, (m_th_t)12, i);
24 }
25
26 cout << "Done..." << nl;
27
28}
29
30int main()
31{
33}
void examples_for_permutations()
int main()
auto nl
auto & cout
Implements nCr, nPr.
Definition: tpf_ncrnpr.hpp:64
enable_if_all_in_list_t< types::type_list_t< Type1, Type2 >, integral_list_t, ReturnType > npr(Type1 nn, Type2 rr)
Definition: tpf_ncrnpr.hpp:428
Stream output operators are defined.
Definition: tpf_output.hpp:58
constexpr new_line nl()
Definition: tpf_output.hpp:837
Stream output operators << are implemented.