提出 #7550351


ソースコード 拡げる

#include <iostream>
using namespace std;

int main(){

  int a,b;
  cin << a << b;

  if (a*b % 2 == 0) {
    cout << "Even" << endl;
  } else {
    cout << "Odd" << endl; 
  }

  return 0;
}

提出情報

提出日時
問題 A - Product
ユーザ edalph
言語 C++14 (GCC 5.4.1)
得点 0
コード長 208 Byte
結果 CE

コンパイルエラー

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:7: error: no match for ‘operator<<’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘int’)
   cin << a << b;
       ^
./Main.cpp:7:7: note: candidate: operator<<(int, int) <built-in>
./Main.cpp:7:7: note:   no known conversion for argument 1 from ‘std::istream {aka std::basic_istream<char>}’ to ‘int’
In file included from /usr/include/c++/5/string:52:0,
                 from /usr/include/c++/5/bits/locale_classes.h:40,
                 from /usr/include/c++/5/bits/ios_base.h:41,
                 from /usr/include/c++/5/ios:42,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from ./Main.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5257:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(b...