Terry E Snyder Jr
&  
RemoteWebs.com  

Computer & Web Solutions

Support, Design, and more...
| | |
November 21st, 2024 6:57:58 AM

1.

What is the first line of every FORTRAN program and what does it tell the compiler?

2.

What are the Five Arithmetic Operators of FORTRAN?

3.

Do you need to use the STOP command at the end of your main line of code?

4.

Fortran uses which kind?
a) special words
b) reserved words
c) keywords
d) magic words

5a.

What is wrong with this line of code: A = B*(A+1-J)*0.25

5b.

Give an example of one predefined FORTRAN function.

6.

Write a single line function that calculates the amount
    of sales tax a person should get charged on a bill.

7.

What data type should you use to represent the following items:
a) number of children at school
b) a letter grade on an exam
c) average number of school days absent each year

8.

How many values does the computer determine to read in
when a READ statement is executed?

9.

How many values does a computer user determine to enter
in to the computer when a READ statement is executed?

10.

What are the six relational operators in FORTRAN?

11.

What are the five LOGICAL operators in FORTRAN?

12.

What is an Algorithm good for?

13.

What is wrong with the following piece of code, and fix
 the code so it will work.
PARAMETER(GACCEL = 9.80665)
INTEGER TIME, MXTIME, DISTNC
REAL GACCEL
PROGRAM SKYDIV
PRINT * ' ENTER MAXIMUM FREEFALL (IN SEC)'
READ *, MAXTIME
PRINT *, '     TIME (SECS)	DISTANCE (METERS)
DO 10 TIME = 1, MXTIME
	DISTNC = 0.5 * (GACCEL) * TIME **2
	PRINT *, TIME, DISTNC
ENDDO

14.

 Write a function that will return a value to this equation. 

15.

Rewrite this code to use the DO WHILE statement:
DO I=1,N,-1
	SUM = SUM + I
END DO
   
 

16.

Write two format statements, one to read in and the
other to output the following data:
Welcome to FORTRAN, 77, 1997, 80.5, is your grade.

17.

What are the 6 descriptors of a FORTRAN format statement?

18.

Why is an array more useful than a single variable?

19.

Draw a graphical representation of what an array looks like.

20.

Write a subroutine that will take the current value of
 the present number in the variable and return the next highest integer value.

21.

How many times does this code print?
DO I = 1,3
	DO J = I,3
		PRINT *, '*'
	END DO
END DO

22.

Write a function that will take a number and return a number that is the original
 number taken to a given exponent.

23.

 Write a program that will calculate the answer to this math problem.

24. Write a program that will store 100 numbers, names, social security numbers into an array and sort the array and print out the data. You do not have to code the sort subroutine, but this is the function call for the sort subroutine. Bubble(num, name, ssn).

Answer Key

Google
 
Web www.terryesnyderjr.com
www.remotewebs.com

Page Updated on August 23, 2020 22:47

www.terryesnyderjr.com Copyright 2000-2024©