Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime
PROGRAM Q2_PERFECT IMPLICIT NONE INTEGER::I,N,K1,K3,K4 READ*,N CALL PERFECT(N,K1) IF(K1==1)THEN Print*,"per" Else Print*,"not" END IF WRITE(*,10) 10 FORMAT('FIRST 4 PERFECT NUMBERS ARE=') K4=0 DO I=1,100000 CALL PERFECT(I,K1) IF(K1==1)THEN PRINT*,I K4=K4+1 IF(K4==100)EXIT END IF END DO END PROGRAM Q2_PERFECT SUBROUTINE PERFECT(N,K1) IMPLICIT NONE INTEGER::I,N,S,K1 S=0 DO I=1,N IF(MOD(N,I)==0)THEN S=S+I END IF END DO IF(S==N+1)THEN K1=1 ELSE K1=0 END IF END SUBROUTINE PERFECT
run
|
edit
|
history
|
help
0
A_04 SIMPSON'S RULE (3(II))
euler-cromer
Fortran!
Practice
Pivot 3
Practice cheby
SIUM(3.7)
my_first_code
Question1(b)
euler-cromer