Language: C++

#include <stdio.h>
int A , B ;
char s [12];
int main ()
{
scanf ("% d % d " ,&A ,& B );
scanf ("% s " ,& s );
for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
{
puts (" No "); return 0;
}
if ( s [ A ]!= ’ - ’)
{
puts (" No "); return 0;
}
for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
{
puts (" No "); return 0;
}
puts (" Yes ");
}

Compiler output:
a.cc:8:38: error: extended character ’ is not valid in an identifier
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                      ^
a.cc:8:41: error: extended character ’ is not valid in an identifier
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                         ^
a.cc:8:67: error: extended character ’ is not valid in an identifier
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                                                   ^
a.cc:8:70: error: extended character ’ is not valid in an identifier
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                                                      ^
a.cc:12:16: error: extended character ’ is not valid in an identifier
   12 | if ( s [ A ]!= ’ - ’)
      |                ^
a.cc:12:20: error: extended character ’ is not valid in an identifier
   12 | if ( s [ A ]!= ’ - ’)
      |                    ^
a.cc:16:47: error: extended character ’ is not valid in an identifier
   16 | for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                               ^
a.cc:16:50: error: extended character ’ is not valid in an identifier
   16 | for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                                  ^
a.cc:16:76: error: extended character ’ is not valid in an identifier
   16 | for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                                                            ^
a.cc:16:79: error: extended character ’ is not valid in an identifier
   16 | for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                                                               ^
a.cc: In function 'int main()':
a.cc:8:38: error: '\U000020190' was not declared in this scope
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                      ^~
a.cc:8:40: error: expected ')' before '\U00002019'
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                    ~   ^~
      |                                        )
a.cc:11:2: error: expected ')' before 'if'
   11 | }
      |  ^
      |  )
   12 | if ( s [ A ]!= ’ - ’)
      | ~~
a.cc:8:34: note: to match this '('
    8 | for ( int i =0; i < A ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                                  ^
a.cc:16:21: error: 'i' was not declared in this scope
   16 | for ( int i = A +1; i <= A + B ; i ++) if (!( ’0 ’ <= s [ i ]&& s [ i ] <= ’9 ’))
      |                     ^