test3

#include <iostream>

// Step 1: Declare a function prototype for the custom function.
int addNumbers(int a, int b);

int main() {
    // Step 2: Declare variables to store user input.
    int num1, num2;

    // Step 3: Prompt the user to enter the first number and store it.
    std::cout << "Enter the first number: ";
    std::cin >> num1;

    // Step 4: Prompt the user to enter the second number and store it.
    std::cout << "Enter the second number: ";
    std::cin >> num2;

    // Step 5: Call the custom function to add the two numbers and store the result.
    int sum = addNumbers(num1, num2);

    // Step 6: Display the result to the user.
    std::cout << "Sum: " << sum << std::endl;

    // Step 7: Return 0 to indicate successful program execution.
    return 0;
}

// Step 8: Define the custom function to add two numbers.
int addNumbers(int a, int b) {
    // Step 9: Add the two numbers and return the result.
    return a + b;
}