From be6711b2ccbb3c12b6537fa40540a0e60ea6c6d0 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Tue, 3 Dec 2024 17:31:01 +0000 Subject: [PATCH] Upload files to "funzioni" --- funzioni/reLu.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 funzioni/reLu.cpp diff --git a/funzioni/reLu.cpp b/funzioni/reLu.cpp new file mode 100644 index 0000000..e064cbd --- /dev/null +++ b/funzioni/reLu.cpp @@ -0,0 +1,22 @@ +/* +AUTORE: Manuel Vichi +Rectified Linear Unit Function +*/ +#include +#include +#include +#include +using namespace std; +char reLu(int x) { + if (x >= 0) + return 'X'; + return '0'; +} +int main() { + int valore; + cout << "Inserisci un valore: "; + cin >> valore; + cout << endl; + cout << reLu(valore); + return 0; +}