#include using namespace std; int gcd(int, int); int main() { int num = 0, den = 1; char junk; cout << "Enter your fractions:" << endl; do{ cin >> num >> junk >> den >> junk; int a; a = gcd (den,num); if (a > 1) { cout << num << " / " << den << " is not in lowest terms!" << endl; } }while (junk != ';'); return 0; } int gcd(int a,int b) { int r; while (b != 0) { r = a % b; a = b; b = r; } return a; }