Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  جدید
Language: FORTRAN
Code:
program adadeavval
integer ::baze,adad,maghsomolelaih,tedad
write(*,*)`N ra vared konid`
do
read(*,*)baze
if(baze>=2)exit
write(*,*)`baze bayad bozorgtar mosavie 2 bashad.vorodi shoma=`,baze
write(*,*)`lotfan bar digar vared konid`
end do
tedad=1
write(*,*)
write(*,*)`adade avvale shomare#`,tedad,`:`,2
do adad=3,baze,2
maghsomolelaih=3
do
if(maghsomolelaih*maghsomolelaih>adad.OR.MOD(adad,maghsomolelaih)==0)EXIT
maghsomolelaih=maghsomolelaih+2
end do
if(maghsomolelaih*maghsomolelaih>adad)then
tedad=tedad+1
write(*,*)`adade avvale shomare#`,tedad,`:`,adad
end if
end do 
write(*,*)
write(*,*)tedad,`adade avval dar baze 2 ta N vojod darad`
end program adadeavval
          
          
Comments: