Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- string product;
- cin >> product;
- if (product == "banana" || product == "apple" || product == "kiwi" || product == "cherry" || product == "lemon" || product == "grapes") {
- cout << "fruit" << endl;
- }
- else if (product == "tomato" || product == "cucumber" || product == "pepper" || product == "carrot") {
- cout << "vegetable" << endl;
- }
- else {
- cout << "unknown" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement