Shows how to use xtd::console, xtd::string classes.
#include <xtd/collections/generic/list>
#include <xtd/console>
auto fibonacci_series(int n) noexcept {
auto a = 1, b = 1;
while (a < n) {
numbers.emplace_back(a);
std::swap(a, b);
b += a;
}
return numbers;
}
auto main() -> int {
console::write_line(string::join(", ", fibonacci_series(1000)));
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:71
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:15
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10