initialize a pair

#include <iostream>
#include <utility>

int main() {
    // Step 1: Include necessary header files
    #include <iostream>
    #include <utility>

    // Step 2: Declare a pair using the pair template
    std::pair<int, double> myPair;

    // Step 3: Initialize the pair using make_pair or direct assignment
    myPair = std::make_pair(42, 3.14);

    // Alternatively, initialize directly
    // std::pair<int, double> myPair = {42, 3.14};

    // Step 4: Access the elements of the pair
    int firstElement = myPair.first;
    double secondElement = myPair.second;

    // Step 5: Print the elements
    std::cout << "First Element: " << firstElement << std::endl;
    std::cout << "Second Element: " << secondElement << std::endl;

    return 0;
}