bousaid

WINDEV PROCEDURE calcul cle cnas

Sep 18th, 2021
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PROCEDURE Cnas(NSS is string)
  2.  
  3. //var
  4. sCle is string
  5. I, X1, X2, N are int
  6.  
  7. X1 = 0
  8. X2 = 0
  9. FOR I = 1 TO 10
  10. N = Val(NSS[I])
  11. IF IsOdd(I) THEN
  12. X2 = X2 + N * 2
  13. ELSE
  14. X1 = X1 + N
  15. END
  16. sCle = NumToString(99 - (X1 + X2),"02d")
  17. END
  18.  
  19. RESULT sCle
RAW Paste Data