IDENTIFICATION DIVISION.
PROGRAM-ID. PROGRAM_ID.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 S         PIC X(30).

PROCEDURE DIVISION.
  ACCEPT S.
  IF S = "Sunny"
    DISPLAY "Cloudy"
  ELSE
    IF S = "Cloudy"
      DISPLAY "Rainy"
    ELSE
      DISPLAY "Sunny"
    END-IF
  END-IF.
  STOP RUN.
