      subroutine chkwav (answ,iansw,wrong,iset)                         CHKW001
c -------------------------------------------------------------------   CHKW002
c     checks, whether answer iansw is correct or not                    CHKW003
c -------------------------------------------------------------------   CHKW004
      parameter (ian5 = 7)                                              CHKW005
      parameter (ian6 = 4)                                              CHKW006
      character*2 anset5(ian5), anset6(ian6), answ                      CHKW007
      logical wrong                                                     CHKW008
      data (anset5(i),i=1,ian5)/'CR','FE','CO','CU','MO','AG','  '/     CHKW009
      data (anset6(i),i=1,ian6)/'A1','A2','B','  '/                     CHKW010
                                                                        CHKW011
      wrong=.false.                                                     CHKW012
      call upstrg (answ,2)                                              CHKW013
      if (iset.eq.5) then                                               CHKW014
         do 0005 i=1,ian5                                               CHKW015
            if (answ.eq.anset5(i)) then                                 CHKW016
               iansw=i                                                  CHKW017
               return                                                   CHKW018
            end if                                                      CHKW019
 0005    continue                                                       CHKW020
      elseif (iset.eq.6) then                                           CHKW021
         do 0006 i=1,ian6                                               CHKW022
            if (answ.eq.anset6(i)) then                                 CHKW023
               iansw=i                                                  CHKW024
               return                                                   CHKW025
            end if                                                      CHKW026
 0006    continue                                                       CHKW027
      end if                                                            CHKW028
      wrong=.true.                                                      CHKW029
      return                                                            CHKW030
      end                                                               CHKW031
                                                                        CHKW032
                                                                        CHKW033
