What am I trying to establish here... jolly good question :eek:
Pretty simple piece of code really but can I get this wretched thing to do as its asked - can I as heck...
All it needs to do is display the type of clothing to be worn in certain weather. Anyway here goes..
char barometer;
char rainfall;
printf ( "Please enter barometer reading" );
scanf ( "%s", &barometer );
printf ( "Did it rain yesterday?" );
scanf ( "%s", &rainfall );
if ( barometer == storm )
{
printf ( "he wears overcoat and hat\n" );
}
if ( barometer == rain )
{
printf ( "he wears raincoat and takes an umbrella\n" );
}
if ( barometer == fair )
{
printf ( "he wears light over-jacket and takes an umbrella\n" );
}
if ( barometer == very dry)
{
printf ( "he wears light over-jacket\n" );
}
if (( barometer == change ) && ( rainfall == yes ))
{
printf ( "%s\n", fair );
}
if (( barometer == change ) && ( rainfall == no ))
{
printf ( "%s\n", rain );
}
exit(0);
}
Thanks for looking... :cheesy: