C++ Codeblock
using namespace std;
uzywając cin/cout

#include <iostream>
using namespace std;
float oblicz(float x)
{
float y;
if (x<=20 && x<=-1) y=2*x+1;
else y=2/x;
return y;
}
int main ()
{
float x;
cout << "Podaj x: ";
cin >> x;
cout << "Wynik to: y=" << oblicz(x) << endl;
return 0;
}