Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- division(20, 4);
- }
- void division(int x, int y)
- {
- for(int i = 1; i < x; i++)
- {
- if( (x - (y*i)) <= 0)
- {
- std:: cout << "El cociente es : " << (y*(i-1)) << endl;
- std:: cout << "El resto es : " << x - (y*(i-1)) << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement