![]() ![]() ![]() Modify your program constmod.f90 to include a module subprogram that calculates the circumference of the circle.Īs in the previous exercise, remove the line use constants and re-compile to see what effect this error has. The number 13 is considered to be very unlucky and if it is obtained as part of the sequence then execution should immediately terminate with an appropriate message.ĭemonstrate that your program works by outputting the sequences generated by the following sets of numbers Set up a loop containing a statement to read in a number input terminated by zero and to print out the sequence obtained from each input. If you take a positive integer, halve it if it is even or triple it and add one if it is odd, and repeat, then the number will eventually become one. ![]() Demonstrate correctness by giving the x, y coordinates for a number of vectors Exercise - Mathematical Magic Write a simple program to read in the radius and calculate the area of the corresponding. Recall that arguments to trigonometric functions are in radians. Write FORTRAN statement(s) that accomplish the following. Write a program to read in a vector defined by a length r and an angle in degrees which prints out the corresponding x y coordinates. The order of the arguments in this command is important: the module(s) should come first. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |