derived.f90
I suggest you either typed this as it appears into the compiler, or as
an easier way, just copy and paste it!
Note: I do not claim
the program will 100% work, but I give it my best. If it doesn't, try tweaking
it yourself, or email me about it, and I'll modify and post the improved version
later. Good luck!
PROGRAM derived2
IMPLICIT NONE
TYPE Computer_Type
CHARACTER (LEN = 12) :: Brand_Name, Monitor_Type
INTEGER :: Clock_Speed
INTEGER :: RAM
REAL :: Cost
CHARACTER (LEN = 10) :: CPU
CHARACTER (LEN = 4 ) :: Multimedia
END TYPE Computer_Type
TYPE (Computer_Type) :: Computer_1
INTEGER :: ans
PRINT*, "Please input the data for the first computer in the order detailed below:-"
PRINT*
GOTO 4
1 PRINT*, "Please input the data again as you have requested"
4 PRINT*, "The brand name (<10 characters), the monitor type (brand of <10 characters),"
PRINT*, "clock speed of CPU, the amount of RAM available, the cost of the system,"
PRINT*, "the CPU brand and the availability of multimedia capability (yes/no)"
PRINT*
READ*, Computer_1
PRINT*
PRINT*, "Brand Monitor Clock Amount Cost CPU Multi-"
PRINT*, "Name Type Speed of RAM media"
PRINT*
PRINT*, Computer_1
PRINT*
PRINT*, "Do you wish to enter another data string?"
PRINT*, "(1 for yes, 2 for no)"
READ*, ans
IF (ans==1)THEN
GOTO 1
ELSE IF (ans==2) THEN
GOTO 2
ELSE
GOTO 3
END IF
3 PRINT*, "Invalid selection. Try again."
2 PRINT*
PRINT*, "Thank you for using ADCY Computer Introductory Database Program"
PRINT*, "Have a nice day:)"
END PROGRAM derived2