Practice

Double Entry Verification

2025/May/Jun·Variant 2
MEDIUMArrays

To prevent data entry errors, a double-entry check is used.

Write a program that:

  1. Inputs 3 numbers into an array called Numbers.
  2. Asks the user to re-enter each number for verification.
  3. If the second entry does not match, output "Error, re-enter" and store the corrected input in the array.
  4. After all checks, output "The check has been completed."

Input: 3 integers (initial), then 3 verification integers (plus corrections if mismatched). Output: Error messages for mismatches, then the completion message.

Example:

Input:  1
        2
        3
        1
        9
        2
Output: Error, re-enter
        The check has been completed.
Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: All match
Inputs: 5, 10, 15, 5, 10, 15
Expected: The check has been completed.
Test 2: One mismatch
Inputs: 1, 2, 3, 1, 9, 2, 3
Expected: Error, re-enter The check has been completed.
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade