Ver Mensaje Individual
  #3
Antiguo 15 de octubre de 2017, 01:26
Hrmcobol
Guardián del Foro
Guardián del Foro: Guardián del espíritu y clima del Foro - Issue reason: Por implicación en la vida del Foro 
Última Actividad 01.03.2022 02:59
Posts Posts: 323
Likes enviados Enviados: 102
Likes recibidos Recibidos: 120

Acá esta la respuesta FITO, me la paso un amigo !!


Código COBOL:
  1.  ENVIRONMENT     DIVISION.
  2.  DATA            DIVISION.
  3.  WORKING-STORAGE SECTION.
  4.  01  Misc.
  5.      05  Pseudo      Pic X.
  6.      05  Multi-Digit Pic 999999999V9(6).
  7.      05  Two-Digit   Pic 99999999.
  8.      05  Vary        Pic 99.  
  9.      05  hora        Pic 99999999.
  10.  PROCEDURE       DIVISION.
  11.  
  12.  Return-Pseudo.
  13.      ACCEPT HORA FROM TIME
  14.      Compute Multi-Digit = (Function Random (hora)) * 1
  15.      Display Two-Digit  " VARY" Vary " -----1--> " Multi-Digit  " --------> " hora  
  16.      Perform Varying Vary from 1 by 1
  17.        Until Vary > 50
  18.         Compute Multi-Digit = (Function Random) * 1
  19.         Move Multi-Digit to Two-Digit
  20.      Display Two-Digit  " VARY" Vary " --------> " Multi-Digit  " --------> " hora  
  21.      End-Perform
Hrmcobol is offline   Responder Con Cita