문제

This is my function to calculate the gcd of two numbers a and b. When I use Prgm and EndPrgm, it worked fine. However, it kept popping up an error message say "Invalid in a function or current expression" when creating a function :(. Any idea?

gcd(a, b )
Func 
 If a>b Then
  a->t
  b->a
  t->b
 EndIf

 While b#0
  a->t
  b->a
  mod(t, b)->b 
 EndWhile
 Return a
EndFunc

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top