Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <iostream>
- #include <string>
- #include <algorithm>
- using namespace std;
- int main() {
- freopen("cond.in", "r", stdin);
- freopen("cond.out", "w", stdout);
- int t1, t2;
- string s;
- cin >> t1 >> t2 >> s;
- if (s == "freeze")
- cout << min(t1, t2) << endl;
- if (s == "heat")
- cout << max(t1, t2) << endl;
- if (s == "auto")
- cout << t2 << endl;
- if (s == "fan")
- cout << t1 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement