Compare current demand with fixed capacity and report remaining reserve.

Capacity Reserve Reliability Report

capacity_reserve_reliability_report.cpp
#include <iostream>
#include <string>

int main() {
    int demand = ;
    int capacity = 100;
    int reserve = capacity - demand;
    std::string status = "stable";

    if (reserve < 20) {
        status = "watch";
    }

    if (reserve < 10) {
        status = "tight";
    }

    std::cout << "demand=" << demand << std::endl;
    std::cout << "reserve=" << reserve << std::endl;
    std::cout << "status=" << status << std::endl;
    return 0;
}
#include <iostream>
#include <string>

int main() {
    int demand = ;
    int capacity = 100;
    int reserve = capacity - demand;
    std::string status = "stable";

    if (reserve < 20) {
        status = "watch";
    }

    if (reserve < 10) {
        status = "tight";
    }

    std::cout << "demand=" << demand << std::endl;
    std::cout << "reserve=" << reserve << std::endl;
    std::cout << "status=" << status << std::endl;
    return 0;
}
#include <iostream>
#include <string>

int main() {
    int demand = ;
    int capacity = 100;
    int reserve = capacity - demand;
    std::string status = "stable";

    if (reserve < 20) {
        status = "watch";
    }

    if (reserve < 10) {
        status = "tight";
    }

    std::cout << "demand=" << demand << std::endl;
    std::cout << "reserve=" << reserve << std::endl;
    std::cout << "status=" << status << std::endl;
    return 0;
}
reserve Reserve is the capacity left after current demand has been accounted for.
capacity status A compact label separates stable, watch, and tight capacity states.