This commit is contained in:
2026-05-26 15:01:50 +02:00
parent 6a948ffe9f
commit a645291f8b
55 changed files with 1337 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
#include <iostream>
template <typename T> int policz(const T *tab, int n, T wartosc) {
int count = 0;
for (int i = 0; i < n; i++) {
if (*(tab + i) == wartosc)
count++;
}
return count;
}
int main() {
int dane[] = {1, 2, 3, 2, 2, 5};
if (policz(dane, 6, 2) == 3) {
std::cout << "Zgadza się :D\n";
}
}