Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

PROGRAM THAT SHOWS THE WORKING OF EVALUATE VERB WITH MULTIPLE CONDITION

Posted By: Vida Fischer     Category: Cobol     Views: 1710

PROGRAM THAT SHOWS THE WORKING OF EVALUATE VERB WITH MULTIPLE CONDITION.

Code for PROGRAM THAT SHOWS THE WORKING OF EVALUATE VERB WITH MULTIPLE CONDITION in Cobol

       IDENTIFICATION DIVISION.
        PROGRAM-ID. EVTEST.

       DATA DIVISION.
        WORKING-STORAGE SECTION.
         01 MARKS PIC 999.
         01 GRADE PIC X(10).

       PROCEDURE DIVISION.
        DISP.
         DISPLAY " ENTER THE MARKS : ".
         ACCEPT MARKS.
          EVALUATE MARKS
           WHEN 80 THRU 100 MOVE "A" TO GRADE
           WHEN 60 THRU  79 MOVE "B" TO GRADE
           WHEN 45 THRU  59 MOVE "C" TO GRADE
           WHEN 30 THRU  44 MOVE "D" TO GRADE
           WHEN ZERO THRU 29 MOVE "E" TO GRADE
           WHEN OTHER MOVE "WRONG" TO GRADE
          END-EVALUATE.
          DISPLAY " GRADE : " GRADE.

           STOP RUN.

/*********************************************************************************
OUTPUT
*********************************************************************************/
ENTER THE MARKS : 89 A
  
Share: 



Vida Fischer
Vida Fischer author of PROGRAM THAT SHOWS THE WORKING OF EVALUATE VERB WITH MULTIPLE CONDITION is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!