Skip to content

Instantly share code, notes, and snippets.

@Ansarina Ansarina/Aval.f90 Secret
Created Oct 22, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.