Seed to flower/mushroom I've already done quite a bit of cleaning up. For example, the strings dryCheck and blueCheck no longer exist, instead they're replaced with "else". But I think this could be done 10x better, so if you know how (no advanced C++ lingo etc), that would be great!


  A red seed will grow into a flower when planted in soil temperatures
  above 75 degrees, otherwise it will grow into a mushroom. Assuming the
  temperature meets the conditions for growing a flower, planting a red
  seed in wet soil will produce a sunflower and planting a red seed in
  dry soil will produce dandelion. A blue seed will grow into a flower
  when planted in soil temperatures ranging from 60 to 70 degrees,
  otherwise it will grow into a mushroom. Assuming the temperature meets
  the conditions for growing a flower, planting a blue seed in wet soil
  will produce a dandelion and planting the blue seed in dry soil will
  produce a sunflower. Write a program that will ask the user to input
  the seed color, the soil temperature and whether the soil is wet or dry
  and then output the plant that will grow.


#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{
    string seedColor, soilMoist, redCheck, wetCheck;
    int soilTemp;

    redCheck = "Red";
    wetCheck = "Wet";
    cout &lt;&lt; "Enter the seed type (Blue/Red): ";
        getline(cin, seedColor);

    cout &lt;&lt; "Enter the soil temperature: ";
        cin &gt;&gt; soilTemp;

    cout &lt;&lt; "Is the soil dry or wet? ";
        cin &gt;&gt; soilMoist; // I tried another "getline(cin, soilMoist), but that conflicts with the cin &gt;&gt; soilTemp; (line 30)

    if (seedColor == redCheck)
    {
        if (soilTemp &gt; 75)
            {
            if (soilMoist == wetCheck)
                cout &lt;&lt; "It's a sunflower!";
            else
                cout &lt;&lt; "It's a dandelion!";
            }
        else
            cout &lt;&lt; "It's a mushroom!";
    }

    else
    {
        if (60 &lt; soilTemp &amp;&amp; soilTemp &lt; 70)
            {
            if (soilMoist == wetCheck)
                cout &lt;&lt; "It's a dandelion!";
            else
                cout &lt;&lt; "It's a sunflower!";
            }
        else cout &lt;&lt; "It's a mushroom!";
    }
}
Just some quick pointers here to get the more obvious details out of the way.  First, you should not use using namespace std;, but rather explicitly state which namespace you are using like this std::cout.  This prevents namespace clashes, and is discussed in great detail here.

Second, you should use braces around your if/else statements and loops even when there is only one statement after it:




if (soilMoist == wetCheck)
    cout &lt;&lt; "It's a sunflower!";
else
    cout &lt;&lt; "It's a dandelion!";



Should be:

if (soilMoist == wetCheck)
{
    std::cout &lt;&lt; "It's a sunflower!";
}
else
{
    std::cout &lt;&lt; "It's a dandelion!";
}


Right here, you should not indent your braces:


if (soilTemp &gt; 75)
    {
    if (soilMoist == wetCheck)
        cout &lt;&lt; "It's a sunflower!";
    else
        cout &lt;&lt; "It's a dandelion!";
    }



You do not do this in other areas, so I don't know why you did it here.

You should also not indent your cins:


cout &lt;&lt; "Enter the soil temperature: ";
    cin &gt;&gt; soilTemp;



You should have your prompts always specify exactly what the input should be.  Here, it looks as if you expect lowercase input: "Is the soil dry or wet? "  However, the program checks for uppercase input.  The best way to fix this would be to allow both "wet" or "Wet".

Otherwise, this looks pretty good.  However, one way you may want to consider expanding your program in is ensuring the user put in the right values instead of merely assuming the right values will be input.  You could do this with a do-while loop, among other ways.

This code is an example of what I mean:

string input = "";

do {
    if (input == "")
    {
        std::cout &lt;&lt; "Is the soil dry or wet? ";
    }
    else
    {
        std::cout &lt;&lt; "Invalid response.\nIs the soil dry or wet? ";
    }

    std::cin &gt;&gt; input;

} while (input != "Wet" &amp;&amp; input != "wet");