Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
program ex2
integer i, j, n, r
integer, dimension (6)
i =
j =
n = 6
r = 0
do i = 1, n
read *, a(i)
end do
do i = 1, n-1
do j = i+1, n, 1
if (a(j) == a(i)) then
igual = .true.
end if
end do
if (igual) then
r = r+1
end if
igual = .false.
end do
print *,a
print *, n-r
pause
end program ex2
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more