cant fix this error after i compiled

i compiled this code but cant fix these errors. (
1170_6_9a.cc: In function 'int main()':
1170_6_9a.cc:48: error: 'dry' was not declared in this scope
1170_6_9a.cc:51: error: '_cout' was not declared in this scope
1170_6_9a.cc:53: error: 'humid' was not declared in this scope )


//include files...
#include <iostream>
#include <string>

using namespace std;

int main()
{
//variable declarations..
string temperature;
string humidity;

cout << "This program will recommend an appropriate activity depending on"
<< endl << "the temperature and humidity\n\n";

cout << "Is the weather warm or cold?\n";
cout << "Type warm or cold :";
cin >> temperature;

cout << "\nIs the weather humid or dry?\n";
cout << "Type humid or dry :";
cin >> humidity;
cout << "\ntemperature = " << temperature << endl;
cout << "humidity = " << humidity << endl;
cout << endl;

//temperature is humidity is activity is
//
// "warm" "dry" "play tennis"
// "warm" "humid" "swim"
// "cold" "dry" "play basketball"
// "cold" "humid" "watch TV"

if ( temperature == "warm")
if (humidity == dry)
cout << "play tennis";
else
_cout << "watch tv";
else
if (temperature == humid)
cout << "swim";
else
cout << "play basketball";
Last edited on
The errors are pretty self explanatory. Error 1 and 3 you forgot the quotation marks around the strings refer to the first condition you have if ( temperature == "warm") Then error 2 I have no comment.
Thank you.
Topic archived. No new replies allowed.