Files
cpp-course/modules/02_control_flow/include/loops.hpp
T

14 lines
440 B
C++
Raw Normal View History

2026-08-11 17:40:36 +03:00
#pragma once
#include <vector>
namespace control_flow {
[[nodiscard]] auto sum_range(int from, int to) -> int;
2026-08-12 14:47:10 +03:00
// ReSharper disable once CppConstParameterInDeclaration
[[nodiscard]] auto factorial(const int n) -> long long pre(n >= 0);
2026-08-11 17:40:36 +03:00
[[nodiscard]] auto count_occurrences(const std::vector<int>& data, int target) -> int;
[[nodiscard]] auto first_index_of(const std::vector<int>& data, int target) -> int;
} // namespace control_flow