-7 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
17% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 4
- Posts with Downvotes
- 3
- Downvoting Members
- 4
1 Posted Topic
rational operator+(rational d)//where num and den are numerator and denominater { int k,n; rational f; k=den*d.den; for(int i=1;i<=k;i++) { if(i%den==0 && i%d.den==0) { n=i; break; } else { n=k; } } f.num=(n/den)*num+(n/d.den)*d.num; f.den=n; return (f); } I think I helped
The End.
USMAN ZAFAR