Skip to main content
Engineering LibreTexts

5.7: Exercises

  • Page ID
    54261
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Below are some quiz questions and project suggestion based on this chapter.

    Quiz Questions

    Below are some quiz questions.

    1. What is the assignment operator?

    2. What is the exponentiation operator?

    3. How can an integer variable be converted to a real value?

    4. How can a real variable be converted to a integer value?

    5. What are the two logical constants?

    6. List three intrinsic functions.

    7. Write the single Fortran statement for each of the following formulas. You may assume all variables are already declared as real values. Additionally, you may assume the variable PI is set as a parameter and initialized to 3.14159.

    \[ x1 = (\frac{\pi}{6})(3a^2 + 3b^2 + c^2) \nonumber \]

    \[ x2 = -\frac{2a}{c} \cos(b) \sin(b) \nonumber \]

    \[ x3 = \frac{-b + \sqrt{(b^2 - 4ac)}}{2a} \nonumber \]

    Suggested Projects

    Below are some suggested projects.

    1. Type in the velocity program, compile, and execute the program. Change the declared values, compile, and execute the modified program. Verify the results of both executions with a calculator.

    2. Write a program to calculate and display the difference between time as read from a sundial and a clock (which is due to the irregular movement of the Sun). The difference can be calculated with the Equation of Time1 which is as follows:
      \[ b = 2\pi(n-81)/365 \nonumber \]\[ e = 9.87 \sin(2b) - 7.53 \cos(b) - 1.5\sin(b) \nonumber \]Where, n is the day number. For example, n = 1 for January 1, n = 2 for January 2, and so on. The program should read the value for n (1-365) from the user as an integer. The program should perform the appropriate type conversions, perform the required calculations, and display the original n value, the calculated b (for reference), and final e value which represents the time difference in minutes. Test the program on a series of different values. The formulas provided are an approximation. For more accurate results, refer to the referenced Wikipedia entry for the complete formula.


    1. For more information, refer to: http://en.Wikipedia.org/wiki/Equation_of_time

    This page titled 5.7: Exercises is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ed Jorgensen via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?