Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include using namespace std; #define MAX 1001 unordered_map > data; int main() { int choice; while(true) { cout cout cin >> choice; if(choice == 1)
#include | |
using namespace std; | |
#define MAX 1001 | |
unordered_map > data; | |
int main() | |
{ | |
int choice; | |
while(true) | |
{ | |
cout | |
cout | |
cin >> choice; | |
if(choice == 1) | |
{ | |
string plant; | |
cout | |
cin >> plant; | |
vector details(10, 0); | |
data[plant] = details; | |
int character = 0; | |
cout Quit "; | |
cout Cold "; | |
cout Shade "; | |
cout Dry "; | |
cout Wet Soil "; | |
cout Acid Soil "; | |
cout City "; | |
cout Pot "; | |
cout Easy Care "; | |
cout Grows Fast "; | |
while(true) | |
{ | |
cin >> character; | |
if(character == 0) | |
break; | |
data[plant][character] = 1; | |
} | |
} | |
else | |
{ | |
break; | |
} | |
} | |
cout | |
for(auto it : data) | |
{ | |
cout | |
for(int x : it.second) | |
cout | |
cout | |
} | |
return 0; | |
} |
I need this code convert it in CLIPS.
This code made from this problem.
Write a CLIPS program that aids in the selection process of a suitable shrub for planting. The table below lists several shrubs and indicates whether each shrub possesses certain characteristics, which include tolerance to cold weather, tolerance to shade, tolerance to drought, tolerance to wet soil, tolerance to acidic soil, tolerance to city dwelling (high pollution), tolerance to growth in a container, whether the shrub is casy to care for, and whether the shrub is fast growing. A bullet indicates the shrub has the characteristic. Input to the program should be facts indicating a desired characteristic that the shrub must have, and the output should be a list of the plants having cach specified characteristic. 7.11 City Dy Wet Soll Shrub Easy Shade Cold Acld Soll Pot Grows Care Fast French hydrangea Oleander :. Northem bayberry Box honeysuckle Gardenia Common juniper Sweet pepperbush Tartarian dogwood Japanese aucuba Swamp azaleaStep 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