Question

In: Computer Science

by using Fortran.90 solve the Question below? Q1)Correct the names of the following variable according to...

by using Fortran.90 solve the Question below?

Q1)Correct the names of the following variable according to the fortran.90 stander.
1)Max'power, 2) 2*level, 3) low temp,   4) High(speed)

Q2)Which of the following are invalid names in Fortran 90 and why?
1)A_HUGE_NUMBER
2)thedate
3)abignumber
4)Program
5)10times
6)Time.minutes
7)HELP!
                                                                   1066(8       
9)another-number
10)no way
11)f[t]
12)X

Solutions

Expert Solution

Q1)
    1) Maxpower    -The ' character is not allowed
    2) level2      -The name cannot start with digit and cannot contain *
    3) lowtemp     -The name cannot contain blanks
    4) Highspeed   -The name cannot contain ( or )

Q2)
    5) is invalid because the name is starting with a digit
    6) is invalid because the character . is present
    7) is invalid because the ! is present
    8) is invalid because it is a number
    9) is invalid because the character - is present
    10) is invalid because it contains blanks
    11) is invalid because characters [ and ] are present


    The rules for variable names in fortran 90 are:

      - A variable name must start with an letter.
      - After that, the rest of the name can contain only letters (a--z), digits (0--9) or underscore character _ (no blanks!).
      - A variable name can be no longer than 31 characters.

Hope this was useful


Related Solutions

Write FORTRAN 90 statements that will display an appropriate message if an integer variable test is...
Write FORTRAN 90 statements that will display an appropriate message if an integer variable test is divisible by 2,3, and or 10 using if statements.
Part 1 For each of the following compound names, determine if the name is correct according...
Part 1 For each of the following compound names, determine if the name is correct according to the rules of naming outlined in Chapter 8. If the name is correct, state "correct". If the name is incorrect, state why it is incorrect and make an appropriate correction without adding or subtracting any atoms from the structure. Misspellings are not to be considered. 1. 5-methylheptane 2. 1-methylpentane 3. ethoxybutane or butyl ethyl ether (the longest carbon branch of the structure contains...
Which following statement(s) about SAS names is/are correct? Check all that apply. A. A SAS variable...
Which following statement(s) about SAS names is/are correct? Check all that apply. A. A SAS variable name starts with a letter or an underscore and continues with any combination of numbers, letters, or underscores as the same as library reference names and data set names. B. A SAS library references name must be 8 characters or less and begin with a letter or an underscore. C. A SAS data set names are 1 to 32 characters in length and are...
Draw and label the basic valuation model using the correct names.
Draw and label the basic valuation model using the correct names.
Write a program (fortran 90) that calls a subroutine to approximate the derivative of y=sin(x)+2x^2 using...
Write a program (fortran 90) that calls a subroutine to approximate the derivative of y=sin(x)+2x^2 using a one-sided difference approach fx = (fi-fi-1)/deltaX and a centered difference approach fx = (fi+1-fi-1)/deltaX. The value of the function f and its derivative fx should be evaluated at x=3.75. Your code should print both values tot he screen when it runs.
QUESTION 7 Determine which of the following statement below are correct. Multiple statements may be correct....
QUESTION 7 Determine which of the following statement below are correct. Multiple statements may be correct. A firm's production function is equal to Q = K^(1/2) L^(1/2) and the Marginal Product of Labor is equal to: MP(L) = 1/2 * K^(1/2) * L^(-1/2) Capital is currently fixed at 81 units. Labor increases from 100 units to 256 units. As a result, the Marginal Product of Labor falls from 0.45 to 0.28. This result means that the productivity of the last...
Assignment Question(s):​​​​​​ Q1. Read the following features related with types of reinsurances and identify the correct...
Assignment Question(s):​​​​​​ Q1. Read the following features related with types of reinsurances and identify the correct type of reinsurance: ​​​​​​​​​​​ a) This type of reinsurance is also termed as stop loss reinsurance. b) In this type agreement, the policyholder is unaware about any indemnity reinsurance transactions pertaining to original contract. c) This type of reinsurance is related with either retaining all claims up to a particular and stated amount by the insurer or retaining each risk. d) In this type...
The class Contact, shown below, which hold first names, last names, and mobile numbers. Using the...
The class Contact, shown below, which hold first names, last names, and mobile numbers. Using the built-in Java ArrayList<Contact> contacts Write a method     public static boolean contains(ArrayList<Contact> list, String firstOrLastName) public class Contact { private int mobileNumber; private String firstName; private String lastName; public int getMobileNumber() { return mobileNumber; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public Contact(int mobile, String first, String last) { mobileNumber = mobile; firstName = first; lastName...
Indicate which of the following are valid C++ variable names and which are not. If not,...
Indicate which of the following are valid C++ variable names and which are not. If not, state the reason the name is invalid. Variable Name Valid – Yes/No If Invalid – Reason income 2time int Tom's two fold c3po income#1 item
Below is an attempt to solve the producer-consumer problem. Is this a correct solution? If yes,...
Below is an attempt to solve the producer-consumer problem. Is this a correct solution? If yes, what is achieved and how? If not, what is the problem? Explain your answer in either case. (Note: Assume no syntax or compilation errors. You’re asked about the concurrency logic/correctness and the use of semaphores for this.) #define N 100                 /* number of slots in the buffer */ semaphore mutex = 1;          /* controls access to critical */ semaphore empty = N;          /* counts...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT