Language: C++

#include <iostream>
using namespace std;

int main()
{
int H,W;

while(cin >> H >> W; != cin >> 0 >>;)
{
cin >> H >> W;

for(int i=0;i<H;i++)
{
for(int j=0;j<W;j++)
{
if((j+i)%2==0)
cout << "#";
else
cout << ".";
}
cout << endl;
} 
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ')' before ';' token
    8 | while(cin >> H >> W; != cin >> 0 >>;)
      |      ~             ^
      |                    )
a.cc:8:22: error: expected primary-expression before '!=' token
    8 | while(cin >> H >> W; != cin >> 0 >>;)
      |                      ^~
a.cc:8:29: error: ambiguous overload for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
    8 | while(cin >> H >> W; != cin >> 0 >>;)
      |                         ~~~ ^~ ~
      |                         |      |
      |                         |      int
      |                         std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
  122 |       operator>>(__istream_type& (*__pf)(__istream_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
  126 |       operator>>(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
  133 |       operator>>(ios_base& (*__pf)(ios_base&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
  352 |       operator>>(__streambuf_type* __sb);
      |       ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*) [with _Traits = char_traits<char>]'
  939 |     operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*) [with _Traits = char_traits<char>]'
  945 |     operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
      |     ^~~~~~~~
a.cc:8:36: error: expected primary-expression before ';' token
    8 | while(cin >> H >> W; != cin >> 0 >>;)
      |                                    ^
a.cc:8:37: error: expected primary-expression before ')' token
    8 | while(cin >> H >> W; != cin >> 0 >>;)
      |                                     ^