23 lines
366 B
C++
23 lines
366 B
C++
/*
|
|
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;
|
|
}
|