How to resolve the algorithm Loops/For with a specified step step by step in the COBOL programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Loops/For with a specified step step by step in the COBOL programming language

Table of Contents

Problem Statement

Demonstrate a   for-loop   where the step-value is greater than one.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Loops/For with a specified step step by step in the COBOL programming language

Source code in the cobol programming language

       IDENTIFICATION DIVISION.
       PROGRAM-ID. Display-Odd-Nums.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  I PIC 99.

       PROCEDURE DIVISION.
           PERFORM VARYING I FROM 1 BY 2 UNTIL 10 < I
               DISPLAY I
           END-PERFORM

           GOBACK
           .


  

You may also check:How to resolve the algorithm Generic swap step by step in the Sather programming language
You may also check:How to resolve the algorithm Call a function step by step in the J programming language
You may also check:How to resolve the algorithm Knuth shuffle step by step in the ACL2 programming language
You may also check:How to resolve the algorithm Arrays step by step in the LOLCODE programming language
You may also check:How to resolve the algorithm Conditional structures step by step in the Z80 Assembly programming language