Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Fear_Is_An_Illusion's blog

By Fear_Is_An_Illusion, 9 years ago, In English
struct mewat1000
{
    string looks="";
}mewat1000;

int main()
{
string your_opinion;
cin >> your_opinion;
mewat1000.looks = your_opinion;

if(mewat1000.looks == "James Bond")
{
    Give++;

}
else
{
    Give--;

}
}
| Write comment?
»
9 years ago, # |
  Vote: I like it +17 Vote: I do not like it

No offense, but if you used that much of your brain in doing programming contests as you use for writing such stupid blogs, you would be much better off, and we'ld be spared from reading such crap.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    Its not crap, its C. Who knows, someone might learn about strucrures in C by reading this blog.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      i tried to compile the code but i got compile error :D,
      maybe they will learn how to get a compilation error =))

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

That if statement, always goes to else section and Give++ would never execute. That's because after cin ing a string, there is no white spaces in that string, while your if statement has the condition some_string == "some string literal with white spaces".