Question

Keep getting an Error in my fortran program in which I find the maximum value of...

Keep getting an Error in my fortran program in which I find the maximum value of the inputted integers.

MY CODE:

PRINT *, "The Max Entered Element is"
PRINT *, MAX (a(i), i = 1, n)

ERROR:

PRINT *, MAX (a(i), i = 1, n)
                          1
Error: Missing keyword name in actual argument list at (1)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The maximum value can be found using the following code.

Code:

Program Hello integer :: a(6) = (1-14,3,0,-2,19,1/) PRINT *, The Max Entered Element is, PRINT *, MAXVAL (a) End Program He

OUTPUT:

The Max Entered Element is 19

Add a comment
Know the answer?
Add Answer to:
Keep getting an Error in my fortran program in which I find the maximum value of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • My program crashes on the line (print('\nThe maximum value from the file is {}'.format(max(i)))) with the...

    My program crashes on the line (print('\nThe maximum value from the file is {}'.format(max(i)))) with the error message TypeError: "int" object not iterable. The purpose of this program is to create an process binary files. Can you tell me what's going wrong? Thanks! ( *'s indicate indentation) from sys import argv from pickle import dump from random import randint from pickle import load if (argv[1] == 'c'): ****output_file = open(argv[2], 'wb') ****for i in range(int(argv[3])): ********dump(randint(int(argv[4]), int(argv[5])), output_file) ****output_file.close() ****print('{}...

  • Python help! I need help getting my code to increment the value. It keep calculating the...

    Python help! I need help getting my code to increment the value. It keep calculating the range over the same number and not moving up! this is the question Write a program named q1() that prompts the user for the starting and ending distance in Kilometers (km), and an increment value. It should then print the conversion table showing values for Kilometers, Miles (M) and Feet (ft). Each value should be displayed as they are calculated. and this is the...

  • I am working on my java but I keep getting this one wrong. Method Name: arrayContains...

    I am working on my java but I keep getting this one wrong. Method Name: arrayContains Access modifier: Private Parameters: 1 integer named number Return type: boolean Purpose: This method returns a true or a false indicating if the number is present in an array or not. In order for this method to work, there must be an array already declared. Therefore, in the CLASS BLOCK, declare an array as follows: static int[] listof Numbers = {1, 2, 3, 4,...

  • I keep getting an error code in my C++ program. It says "[Error] 'strlen' was not...

    I keep getting an error code in my C++ program. It says "[Error] 'strlen' was not declared in this scope" in my main.cpp. Here are my codes. main.cpp #include <iostream> #include <string> #include "functions.h" using namespace std; //definition of the main function. //takes arguments from the command-line. int main(int argc, char *argv[]) { //Determine if you have enough arguments. //If not, output a usage message and exit program if (argc<2 || (argc == 2 && argv[1][0] == '-')) { //call...

  • 22Hello, I am keep getting this warning on MATLAB; ''Assignment has more non-singleton rhs dimensions than...

    22Hello, I am keep getting this warning on MATLAB; ''Assignment has more non-singleton rhs dimensions than non-singleton subscripts'' what does it mean?? the matlab code is; %%Use the built-in min and max function to find minimum element of matrix A and maximum element of matrix B for each column fprintf('Matrix from minimum of A maximum of B: \n'); A = [22,0;12 -4]; B = [14,4;-3 9]; R(1,:) = max(B); R(2,:) = min(A); disp(R); can you help me?? thank you so...

  •    im trying to print out my file I kept getting an error , i have...

       im trying to print out my file I kept getting an error , i have to to use iterator and algorthim         private:              std::string name;        std::list<practice> example;        public: void Write(std::ostream& os) {      os << name << std::endl;        std::for_each(example.begin(),example.end(), [&os](int& i)        {             os << i << std::endl;//here os is not capture        }); }

  • I need help with my code. It keeps getting this error: The assignment is: Create a...

    I need help with my code. It keeps getting this error: The assignment is: Create a class to represent a Food object. Use the description provided below in UML. Food name : String calories : int Food(String, int) // The only constructor. Food name and calories must be // specified setName(String) : void // Sets the name of the Food getName() : String // Returns the name of the Food setCalories(int) : void // Sets the calories of the Food...

  • while trying to run this in python, i keep getting the error TypeError: int() can't convert...

    while trying to run this in python, i keep getting the error TypeError: int() can't convert non-string with explicit base. any way to fix this? def binaryToDecimal(n): return int(n,2) if __name__ == '__main__': num3 = int(input("Enter value to be converted: ")) print(binaryToDecimal(num3))

  • "Function does not take 0 arguments". I keep getting this error for my last line of...

    "Function does not take 0 arguments". I keep getting this error for my last line of code: cout << "First Name: " << employee1.getfirstName() << endl; I do not understand why. I am trying to put the name "Mike" into the firstName string. Why is my constructor not working? In main it should be set to string firstName, string lastName, int salary. Yet nothing is being put into the string. #include<iostream> #include<string> using namespace std; class Employee {    int...

  • I am currently doing homework for my java class and i am getting an error in...

    I am currently doing homework for my java class and i am getting an error in my code. import java.util.Scanner; import java.util.Random; public class contact {       public static void main(String[] args) {        Random Rand = new Random();        Scanner sc = new Scanner(System.in);        System.out.println("welcome to the contact application");        System.out.println();               int die1;        int die2;        int Total;               String choice = "y";...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT