Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main(){
- int temperature;
- string flower, stype;
- string res;
- cin >> flower >> temperature >> stype;
- // restrictions
- if ((flower != "red" && flower !="blue") || (stype != "wet" && stype != "dry"))
- {
- cout << "bullshit";
- return 0;
- }
- if (flower == "red")
- {
- if (temperature >= 60)
- {
- if (stype == "wet")
- {
- res = "sunflower";
- }
- else
- {
- res = "tulip";
- }
- }
- else
- {
- res ="mush";
- }
- }
- else if (flower == "blue")
- {
- if (temperature >= 50 && temperature <= 75)
- {
- if (stype == "wet")
- {
- res = "tulip";
- }
- else
- {
- res = "sunflower";
- }
- }
- else
- {
- res ="mush";
- }
- }
- cout << res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement