👤

Elaborati un program care afiseaza valorile functiei logice z= x∨ y

Răspuns :

Pentru C++

#include <iostream>

using namespace std;

int main()
{
    int x,y,z;
    cin >> x >> y;
    z=x | y;
    cout << z ;
    return 0;
}

Pentru Pascal 

var x,y,z:integer;

begin
  read(x,y);
  z:=x or y;
  write(z);
end.