Preview:
#include <iostream>

int main() {
    int n, m;

    // Prompt the user for the number of cups a box can hold and the total number of cups to pack
    std::cout << "Enter the number of cups a box can hold (n): ";
    std::cin >> n;
    std::cout << "Enter the total number of cups to pack (m): ";
    std::cin >> m;

    // Calculate the number of full boxes and remaining cups
    int fullBoxes = m / n;
    int remainingCups = m % n;

    // Display the results
    std::cout << "Number of full boxes: " << fullBoxes << std::endl;
    std::cout << "Number of cups left unpacked: " << remainingCups << std::endl;

    return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter