Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help fixing my code. all if rather than if else else if ( frg < ' z ' ) { cout < <
I need help fixing my code. all if rather than if else
else iffrg z
cout
An invaild Region of the Golf Course was selected.";
Is not correct would be correct as an else only if you had used ifelse #include
#include
using namespace std;
int main
float fr;
float in;
char frg;
cout "Fall Automated Bruin Golf Course Sprinkler System" endl;
cout "What is the temputure in degrees F;
cin fr;
cout
How much precipitation today in inches;
cin in;
cout
The Golf course grass divisions are FFairways RRough Greens
;
cout "Which do you chose FRG;
cin frg;
if frg Ffrg f
if fr in
cout
Given the temperature is fr degrees and setprecision in inches of precipitation today
The Fairways on the Golf Course will not be watered.";
else
cout
Given the temperature is fr degrees and setprecision in inches of precipitation today
The Fairways on the Golf Course will be watered.";
if frg Rfrg r
if fr in
cout
Given the temperature is fr degrees and" setprecision in "inches of precipitation today
The Rough on the Golf Course will not be watered.";
else
cout
Given the temperature is fr degrees and setprecision in inches of precipitation today
The Rough on the Golf Course will be watered.";
if frg Gfrg g
if fr in
cout
Given the temperature is fr degrees and" setprecision in "inches of precipitation today
The Greens on the Golf Course will not be watered.";
else
cout
Given the temperature is fr degrees and setprecision in inches of precipitation today
The Greens on the Golf Course will be watered.";
else iffrg z
cout
An invaild Region of the Golf Course was selected.";
return ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started