0 Replies - 4868 Views - Last Post: 22 February 2012 - 05:26 AM Rate Topic: -----

#1 DoremiCSD  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-February 12

Fortran 90:I have problem how to continue my program

Posted 22 February 2012 - 05:26 AM

Hey guys, i tried to do this program in fortran 90 but at the end of the program i stucked at 2 points:


My program is here:
program Arithmetical

implicit none

integers :: a, b, c, d

print *, "Give me an integer a:"
read *, a

print *, "Give me an integer b:"
read *, b

print *, "Give me an integer c:"
read *, c

print *, "Give me an integer d:"
read *, d

if(a .ge. B) then
print *, "Invalid."
stop
endif

if(c .ge. d) then
print *, "Invalid."
stop
endif

do
print *, "Give me an integer a:"
read *, a
print *, "Give me an integer b, not less than a:"
read *, b
if(a .ge. B) exit
print *, "Found b less than a, please re-enter your numbers a & b"
endif
end do

do
print *, "Give me an integer c:"
read *, c
print *, :Give me an integer d, not less than c:'
read *, d
if(c .ge. d) then
print *, "Found d less than c, please re-enter your numbers a & b"
ebdif
end do


MY PROBLEM IS HERE ITS SAYS THIS BUT I CANT TO DO IT:Once your program reads these numbers should

1. to print the squares of integers k such that is
a ≤ k ≤ b.
2. To print the product of all integers r is such that
c ≤ r ≤ d.

THE WHOLE INTRO IS HERE:Write a program in Fortran 90 (not fortran 77) that reads from the user 4 integers a, b, c, d. The program should first check if applicable inequality
a ≤ b, c ≤ d.
If not then it should asking again numbers from the user until they have given numbers satisfying these inequalities. Once your program reads these numbers should

1. to print the squares of integers k such that is
a ≤ k ≤ b.
2. To print the product of all integers r is such that
c ≤ r ≤ d.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1