Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Palindrome-detection/COBOL/palindrome-detection.cobol
Normal file
19
Task/Palindrome-detection/COBOL/palindrome-detection.cobol
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
identification division.
|
||||
function-id. palindromic-test.
|
||||
|
||||
data division.
|
||||
linkage section.
|
||||
01 test-text pic x any length.
|
||||
01 result pic x.
|
||||
88 palindromic value high-value
|
||||
when set to false low-value.
|
||||
|
||||
procedure division using test-text returning result.
|
||||
|
||||
set palindromic to false
|
||||
if test-text equal function reverse(test-text) then
|
||||
set palindromic to true
|
||||
end-if
|
||||
|
||||
goback.
|
||||
end function palindromic-test.
|
||||
Loading…
Add table
Add a link
Reference in a new issue