i have to write to the output Write to the output the sequence of division remainders of these numbers over a small integer but sorted in the non-decreasing order.i wrote a code for remainder but i cant write for them to sort.
Here is the code:

#include <iostream>
using namespace std;

int main()
{    
    int divisor, dividend, quotient, remainder;

    cout << "Enter dividend: ";
    cin >> dividend;

    cout << "Enter divisor: ";
    cin >> divisor;

    quotient = dividend / divisor;
    remainder = dividend % divisor;

    cout << "Quotient = " << quotient << endl;
    cout << "Remainder = " << remainder;

    return 0;
}
Olive34 commented: What are you sorting? There's nothing to sort here. (old hw post, likely no answer needed now, but still) +0

I'm curious to know how you solved the problem. Cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.