Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
120 views
in General by (102k points)
closed by

In the FORTRAN program

M = 0

DO 100I = 1, 2

DO 200J = 1, 2

M = M + I + J

200 CONTINUE

100 CONTINUE

STOP

END

The value of M, in the end, will be


1. 10
2. 11
3. 12
4. 14

1 Answer

0 votes
by (101k points)
selected by
 
Best answer
Correct Answer - Option 3 : 12

M = 0, I = 1, J = 1

M = M + I + J

M = 0 + 1 + 1 = 2

M = 2, I = 1, J = 2

M = 2 + 1 + 2 = 5

M = 5, I = 2, J = 1

M = 5 + 2 + 1 = 8

M = 8, I = 2, J = 2

M = 8 + 2 + 2 = 12

So the value of M, in the end, is 12.

  • Note – The number 100/200 after the command ‘DO’ gives the label number ending the loop. Since most DO loops operate with an increment of 1 that’s why increment has not been mentioned. 

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...