-
-
Save Ansarina/b182c04c209892c830d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Integer Function Aval(n) !looking for prime number | |
Integer::n,i, BakhshPazir | |
BakhshPazir=0 | |
Do i=1, n | |
If(mod(n,i)==0)then | |
BakhshPazir= BakhshPazir+1 | |
EndIf | |
End do | |
If (BakhshPazir==2) then | |
Aval=n | |
Else | |
Aval=0 | |
EndIf | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment