0
Can somebody help in this code
ı want this code to do of you write potato it sais it is a potato and if you don't say potato like Apple or orange or potat things are not potato it will say it is not a potato https://code.sololearn.com/cftQFKqSJKi5/?ref=app
2 Réponses
+ 13
#include <string>
#include <iostream>
using namespace std;
int main() {
string a = "is a potato";
string b = "is not a potato";
string word;
cin >> word;
if (word == "potato") cout << a;
else cout << b;
return 0;
}
• You forgot semicolons.
• Input "word" must be a string.
• String "potato" needs quotes.
• The "if condition" needs parentheses.
+ 1
thank you very much for your help