{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW-1.cpp - /janine dabu...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//janine dabu hw1 #include<iostream> #include<conio.h> using namespace std; void maxdivs(int low, int high, int& num, int& ndiv); int numdivs(int number); void main() { int low, high; int num, ndiv; cout << "Enter two integers: "; cin >> low >> high; maxdivs(low, high, num, ndiv); cout << num << ' ' << ndiv << '\n'; cout << "\nPress any key to continue."; _getch(); }void maxdivs(int low, int high, int& num, int& div) { if (low > high) { int temp = low; low = high; high = temp; }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}