Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEFINE VARIABLE i_width AS INTEGER NO-UNDO.
- DEFINE VARIABLE i_height AS INTEGER NO-UNDO.
- DEFINE VARIABLE i_length AS INTEGER NO-UNDO.
- DEFINE VARIABLE i_smallest AS INTEGER NO-UNDO.
- DEFINE VARIABLE i_surface AS INTEGER NO-UNDO.
- DEFINE VARIABLE i_temp AS INTEGER NO-UNDO.
- DEFINE VARIABLE s_row AS CHARACTER NO-UNDO.
- INPUT FROM "d2inp.txt".
- DO WHILE TRUE ON ENDKEY UNDO, LEAVE:
- IMPORT UNFORMATTED s_row.
- ASSIGN
- i_width = INTEGER(ENTRY(1, s_row, 'x'))
- i_height = INTEGER(ENTRY(2, s_row, 'x'))
- i_length = INTEGER(ENTRY (3, s_row, 'x')).
- {cntsquares.i i_width i_height}
- {cntsquares.i i_width i_length}
- {cntsquares.i i_height i_length}
- i_surface = i_surface + i_smallest.
- i_smallest = 0.
- END.
- DISPLAY i_surface .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement