Explore BrainMass

Explore BrainMass

    Java, FORTRAN, and C++

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    1a. What is the output from the following section of FORTRAN code?

    ISUM = 0
    I = 1
    20 IF (I .GT. 4) GO TO 30
    ISUM = ISUM + I
    I = I + 1
    GO TO 20
    30 WRITE (*,*) ISUM

    b. Write an equivalent section of Java code.

    2. What is true after the following statements in a C/C++ program have been executed?

    int* intPointer;
    intPointer = (int*) 500;
    *intPointer = 10;

    © BrainMass Inc. brainmass.com December 24, 2021, 7:27 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/java-fortran-c-c-191161

    Solution Preview

    1a. What is the output from the following section of FORTRAN code?

    ISUM = 0
    I = 1
    20 IF (I .GT. 4) GO TO 30
    ISUM = ISUM + I
    I = I + 1
    GO TO 20
    30 WRITE (*,*) ISUM

    Answer: The output ...

    Solution Summary

    This response includes solutions finding the output of a FORTRAN code and its equivalent section of Java code, and explains statements of a C++ program.

    $2.49

    ADVERTISEMENT