mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
bla bla
This commit is contained in:
14
uczelnia/2_semestr/programowanie/laby/lab12/zad5.cpp
Normal file
14
uczelnia/2_semestr/programowanie/laby/lab12/zad5.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
|
||||
template <typename T> T minZ3(T a, T b, T c) {
|
||||
return a < b ? (a < c ? a : c) : (b < c ? b : c);
|
||||
}
|
||||
|
||||
int main() {
|
||||
if (minZ3(7, 2, 5) == 2) {
|
||||
std::cout << "1 ok\n";
|
||||
}
|
||||
if (minZ3(3.5, 1.2, 4.8) == 1.2) {
|
||||
std::cout << "2 ok\n";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user