N

@nazir_168

frequency

Fortran
4 years ago
program main IMPLICIT none INTEGER :: n,copy,dig,d,I,R=0,J INTEGER :: NUM(10) PRINT *,"enter a number" read *,n copy=n DO I=1,10 NUM(I)=0 ENDDO

frequency of no

Fortran
4 years ago
program frequency implicit None integer ::n,i,count,m,digit print *,"Enter the number=" read *,n do i=0,9 count=0 m=n do while (m>0) digit=mod(m,10)

highest no

Fortran
4 years ago
program main IMPLICIT none INTEGER :: n,copy,dig,d,I,R=0,J INTEGER :: NUM(10) PRINT *,"enter a number" read *,n copy=n DO I=1,10 NUM(I)=0 END DO

kaprekar number

Fortran
4 years ago
Program main Implicit none INTEGER::n,n1,r,q,c=0 ,x Print*,"ENTER AN INTEGER" read*,n x=n n1=n*n DO WHILE(n/=0) r=mod(n,10) c=c+1

Fibonacci reverse

Fortran
4 years ago
program main IMPLICIT none INTEGER :: a=0,b=1,c=0,n,i PRINT *,"ENTER a NUMBER" read *,n do i=1,n-2 c=a+b a=b b=c ENDDO

sum of series

Fortran
4 years ago
program main IMPLICIT none INTEGER :: n,i,f,j REAL :: t,s=0,a PRINT *,"ENTER NUMBER of terms and contsant" read *,n,a do i=1,n f=1 do j=1,i f=f*j

palindrome no

Fortran
4 years ago
Program main Implicit none INTEGER::n,rev=0,r,p Print*,"ENTER AN INTEGER" read*,n p=n DO WHILE(n/=0) r=mod(n,10) rev=rev*10+r n=n/10

gg

Fortran
4 years ago
program main implicit none integer :: n,n1,i,s,j,r print*,"how many digit" read*, j print*,"enter the digit" read*, n n1 = 0 r = 10**(j-1) do i = 1,j

prime numbers

Fortran
4 years ago
program main IMPLICIT none INTEGER :: a,b,c=0,i,J,D PRINT *,"ENTER 2 NUMBERS" read *,a,b I=A PRINT *,"PRIME NUMBERS ARE" IF(A>B) THEN D=A A=b

perfect square or not

Fortran
4 years ago
Program Hello implicit none integer ::n,i=1, f=0 print *,"enter a number " read*, n do while (i<n) if (i*i==n)f=1 i=i+1 end do if (f==1) then

prime numbers

Fortran
4 years ago
program main integer :: x,y print*,"enter the range x,y " read*, x,y do 15 x=x,y,1 m=0 do 10 I =2, (x-1),1 xrI=x-x/I*I if (xrI==0) m=m+1 10 continue

fabonacci series

Fortran
4 years ago
program main implicit none integer :: i,n,a,b,s print*, "enter the numbers of term" read*, n a = 0 b = 1 print*, a do i = 1, n-1 s = a+b

prime or not

Fortran
4 years ago
program main IMPLICIT none INTEGER :: a,b,C=0,i,s=0,X=0 PRINT *,"ENTER A NUMBER" read *,a DO I=1,A/2 if(mod(a,i)==0) C=C+1 ENDDO IF(C==1) THEN PRINT *,"PRIME NUMBER"

LCM

Fortran
4 years ago
program main implicit NONE integer:: a,b,c,lcm,i,j print*,"enter the two numbers" read*,a,b i=a j=b if(a<b) then c=a a=b

HCF

Fortran
4 years ago
program main implicit none integer :: a, b, c print*, "Enter Two positive integers" read*, a, b if (a < b) then c = a a = b b = c end if

power**

Fortran
4 years ago
program main implicit none integer :: i,a,b real :: m print*, "enter the value of x and n " read*, a,b m=1 do i = 1, abs(b) if (b==0) then m=1

multiplication**

Fortran
4 years ago
program main implicit none integer :: i,a,b,s print*, "enter two numbers" read*, a,b s = 0 do i=1, abs (b) if (b>0) then s = s+a else

series

Fortran
4 years ago
program main IMPLICIT none INTEGER :: p=1,i,j,x,n REAL :: s=0,t,f PRINT *,"ENTER 2 NUMBERS" read *,x,N DO i=1,N f=1 DO j=1,i f=f*J

product

Fortran
4 years ago
program main implicit none integer :: n,i real :: prod =1.0,x print*,"enter the value of x" read*, x print*,"enter the value of n" read*,n if (n==0)then prod = 1.0

product

Fortran
4 years ago
program NUM integer::X,n,p,product,i product=1 print*,"Enter the number x and n" read*,X,n if (n>0) p=n if (n<0) p=-n DO i=1,p,1 product= product * X end DO