The problem with your code is in this line:
(f-32)*5/9
Since f is declared as int, the expression (f-32)*5/9 performs integer division. In C++, when you divide two integers, the result is also an integer (it truncates the decimal part). So 5/9 = 0 (not 0.555...).
This means your Celsius value will always be 0, regardless of the Fahrenheit input!
Fix: Use floating-point division by making at least one operand a double/float:
(f-32)*5.0/9.0
Or better yet, change your variable to double and use proper formatting:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double f;
cout << "Temperatura w skali Fahrenheita: ";
cin >> f;
cout << fixed << setprecision(2);
cout << f << " stopni F to " << (f-32)*5.0/9.0 << " stopni C" << endl;
return 0;
}
This way the division will work correctly and give accurate Celsius values!