forgejo-test-repo/main.cc

11 lines
258 B
C++

#include <iostream>
auto get_fib_of(int n) -> int {
return n < 2 ? 1 : get_fib_of(n - 1) + get_fib_of(n - 2);
}
auto main() -> int {
std::cout << "hello, world" << std::endl;
std::cout << "10th fib is: " << get_fib_of(10) << std::endl;
return 0;
}