Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone check my code here? I have a problem making the denominator a positi

ID: 3710620 • Letter: C

Question

Can someone check my code here? I have a problem making the denominator a positive number.  

Look at line 40 to 43.

SubMENU -INITIALIZING * 1. Creating *2. Updating *3. Returning Select an option (integer only): 1 Creating 2 NEW Fraction objects - Calling create )! Creating Left Fraction Enter num: 5 CIS25-C++ Programming; Homework #4-Page 5 of 10 Enter denom-9 Left Fraction- num: -5 denom: 9 Creating Rigft Fraction Enter num:3 Enter denom4 Right Fraction - num -3 denom: 4 (How many objects were involved? XXX)

Explanation / Answer

void FractionSamuelR::setDenomirator(int d){

if(d<0)

d = -(d);

denom = d;

}

I have done convert if denominator is negative... then I changed to positive i.e., abs(denominator)

If any thing wrong, please give me comment... I will help you until get output...