File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
06_operator_overloading_and_friend_function Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,42 @@ Overload the following operators as member or friend:
1313a. Unary ++ (pre and post both)
1414b. Overload as friend functions: operators << and >>.
1515
16+
17+ Output :-
18+
19+ >>>>>>>> Enter Two Fraction to Perform Operations <<<<<<<<<
20+
21+ >>>>>>>> Enter First Fraction (f1) <<<<<<<<<
22+
23+ Enter Numerator => 6
24+
25+ Enter Denominator => 23
26+
27+ >>>>>>>> Enter Second Fraction (f2) <<<<<<<<<
28+
29+ Enter Numerator => 8
30+
31+ Enter Denominator => 6
32+
33+
34+ First Fraction => 6/23
35+
36+ Second Fraction => 8/6
37+
38+ ++f1 => 7/24
39+
40+ f1++ => 8/25
41+
42+ f2 = ++f1
43+
44+ f1 => 9/26
45+ f2 => 9/26
46+
47+ f2 = f1++
48+
49+ f1 => 10/27
50+ f2 => 9/26
51+
1652*/
1753
1854// // Header files
You can’t perform that action at this time.
0 commit comments