as my username states, i like, but am very bad at C++
+i want to do something with C++ “Cin” then i F#$@ up
i have no idea how to fix this, maybe its because of “Else(H != “Huh?”);{” but i don’t know.
i wanted to do a little dumb thing, but then i messed up horribly
#include <iostream>
using namespace std;
int main() {
string H;
cout << "write a word and I'll add 'Huh?'";
cin >> H;
if (H == "Huh?"){
cout << " no huh";
}
else(H != "Huh?");{
cout << H << " Huh?";
return 0;
}
}
write a word and I’ll add ‘Huh?’
input: Huh?
expected output: no huh
actual output: no huhHuh? Huh?
why am i making this? someone told me to get a hobby, and i remember a bit of C++.
user25309830 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.