#include <iostream>
using namespace std;

namespace Config {
    int baudRate = 115200;
    int threshold = 1000000;
}

// your code here: declare namespace UART with int baudRate=115200
namespace UART {
    int baudRate = 115200;
}

// your code here: declare namespace SPI with int clockSpeed=1000000
namespace SPI {
    int clockSpeed = 1000000;
}

int main() {
    // Accessing members using the Scope Resolution Operator (::)
    cout << "UART Baud: " << UART::baudRate << "\n";
    cout << "SPI Clock: " << SPI::clockSpeed << "\n";
    
    return 0;
}
Upvote
Downvote
Loading...

Input

Expected Output

UART Baud: 115200 SPI Clock: 1000000