Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя Fear_Is_An_Illusion

Автор Fear_Is_An_Illusion, 9 лет назад, По-английски
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--;

}
}
  • Проголосовать: нравится
  • -64
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

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 лет назад, # ^ |
      Проголосовать: нравится -8 Проголосовать: не нравится

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

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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".