lab3 Flashcards
(5 cards)
1
Q
create a loop that print 1 to 100
A
do i=1,100
print*,i
end do
2
Q
create a loop that print values from 1 to 10 in decreasing order
A
do i=10,1,-1
print*,i
end do
3
Q
create a program that keeps printing values till you reach 100
A
99 continue
i=i+1
print*,i
if (i=100) then
exit
end if
goto99
4
Q
print program that prints numbers dividable by 3 from 1 to 100
A
do i=0,100,1
j=i/3
if (i-(3*j)==0)then
print*,i
endif
enddo
5
Q
Find the sum of all the integer numbers between 0 and 100
A
do i=1,100
s=s+i
enddo
print*,s