benchmarks.wiki / Public workspace

MMLU-Pro / 10506 / What is the output of the following program? PROGRAM TEST (output); VAR I, J, K,…

Problem

Answer published by the source. Consult the official source to check your work against its answer.

question

What is the output of the following program? PROGRAM TEST (output); VAR I, J, K, COUNT : integer; BEGIN I: = 1; J: = 2; K: = 3; count: = 1; write1n (I div J, K mod J); while count < = 3 DO BEGIN If I < J then If K > J then If (K > I) or (I = J) then write1n (I) ELSE write1n (J) ELSE write1n (K); CASE COUNT OF 1: J: = 0; 2: BEGIN K: = K - 1; J: = J + K END; 3:I: = 2 \textasteriskcentered I; END; count : = count + 1; END {while count........} END.

category

computer science

options

  1. 2 2
  2. 2 3
  3. 1 0
  4. 0 2
  5. 3 2
  6. 0 1
  7. 2 1
  8. 3 0
  9. 1 1
  10. 1 2

src

stemez-ComputerScience

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import