Question

6. Show the step-by-step trace through the following Fortran program segments and predict the output. a) INTEGER I, J, K DO I

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) 2, 2, 1

b)1.00000000

   2.00000000                                                                                                                                                                      

   3.00000000                                                                                                                                                                      

   6.00000000                                                                                                                                                                      

   27.0000000

Add a comment
Know the answer?
Add Answer to:
6. Show the step-by-step trace through the following Fortran program segments and predict the output. a)...
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
  • Kindly show the steps please. thank you 1) What is the output of the following program?...

    Kindly show the steps please. thank you 1) What is the output of the following program? Kindly trace the program by hand I will be asking similar questions in the final exam, you will not have computer to run the code you will have to answer the same by tracing the code. So practise now? 10 Points La lab6.py - C:/Users/sanjay/Documents/Couse2 File Edit Format Run Options Window Help #a i = 1 while i<=4: print ("*"*i) i = i +1...

  • 2. Design the logic for a program that outputs every number from 1 through 15. 3....

    2. Design the logic for a program that outputs every number from 1 through 15. 3. Design the logic for a program that outputs every number from 1 through 15 along with its value times 10 and times 100. // please answer e, f, 2, 3 <----- 1. What is output by each of the pseudocode segments in Figure 5- 30? b. a. C. d=4 1 a = g4 h 6 while g< h b 2 e 6 f 7...

  • PART A: Predict how many lines of output will be displayed by the following program fragment:...

    PART A: Predict how many lines of output will be displayed by the following program fragment: i = 0 ​​ do { ​​for (j = 0; j < 4; j = j + 1) ​​printf("%d\n", i + j); ​​i = i + 1; ​​} while (i < 5); PART B: Then write either a C or a C++ program to verify your prediction. ​​ I know it will output 20 lines, the full C++ code is what I need.

  • Part #2 Trace and show your steps and the output of the following code segment const...

    Part #2 Trace and show your steps and the output of the following code segment const int TEN = 10; int a(TEN), n = 354, num, c = 0; num = n; a[C++] = num % TEN; num = num/TEN; } while (num); cout << "The number" <<n<<" is now: for (int k = -1;k >= 0; k--) cout << a[k]; cout << endl; Trace and show the content of the arrays A and B int A[7] = {66, 55,...

  • What is the output from each of the following segments of C++ code? Record the output...

    What is the output from each of the following segments of C++ code? Record the output after the “Answer” prompt at the end of each program fragment. Assume all variables have been suitably declared. (Each problem is worth 3 points.) for (int k = 2; k < 5; k++)                    {       for (int j = 3; j < 6; j++)      cout << setw(4) << (k + j) << " ";       cout << endl;    }

  • 6) Show the output of the following program. You mus trace the code to show how...

    6) Show the output of the following program. You mus trace the code to show how you reached the answer. (5 points) #include <stdio.h> int x 18; int y = 5; int z ·e; void my first function) void my_second_function); int main() int ys y = x; if (z) my_first functionO else my-second-function(); x++ : if (z) my_first_function(); else my_second_function(); return e; void my_first_function) x+y); is %d\n", printf("The value of x+y in my-first-function() void my_second_function) ( x=100; is %d\n", x);...

  • What is the output from each of the following segments of C++ code? Record the output...

    What is the output from each of the following segments of C++ code? Record the output after the “Answer” prompt at the end of each program fragment. Assume all variables have been suitably declared. (Each problem is worth 3 points.) 1. for (int j = 25; j > 16; j -= 3)        cout << setw(5) << j;     Answer: 2. int sum = 0;       for (int k = -2; k <= 2; k++)         sum = sum +...

  • Activity 16-02 With proper indentation and comments, With proper interface/menu on the monitor Write C program...

    Activity 16-02 With proper indentation and comments, With proper interface/menu on the monitor Write C program of the following problem. This question involve repetition: while, and for statements This question involve selection: Don't use switch, use IF Marks is based on comments, indentation and interface/menu. You must try Choose any one value of j to print screen the following i Three input: num less than j, 21 and any valid number three input: A, B and X. Question: 1.0 From...

  • Show the output produced by each of the following program fragments. Assume that I, j, k...

    Show the output produced by each of the following program fragments. Assume that I, j, k are int variables i = 7; j = 2; printf(“%d %d ”, i / j, i % j); i = 4; j = 3; printf(“%d”, (i + 10 ) % j); i = 7; j = 8; k = 9; printf("%d”, (i + 10) % k / j); Show the output produced by each of the following program fragments. Assume that I, j, k...

  • Trace through the following code. Does it correctly output the chorus to the Beatles song All...

    Trace through the following code. Does it correctly output the chorus to the Beatles song All You Need Is Love?   for x in range(1, 3): print ("All you need is love ") print ("love") print ("love is all you need")

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