Upload files to "funzioni"

This commit is contained in:
Vichingo455 2024-12-03 17:31:01 +00:00
parent cef151f300
commit be6711b2cc
1 changed files with 22 additions and 0 deletions

22
funzioni/reLu.cpp Normal file
View File

@ -0,0 +1,22 @@
/*
AUTORE: Manuel Vichi
Rectified Linear Unit Function
*/
#include <iostream>
#include <array>
#include <vector>
#include <cstdlib>
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;
}