File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
python-bindings/overview_article Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ float cmult(int int_param, float float_param) {
66 float return_value = int_param * float_param ;
77 printf (" In cmult : int: %d float %.1f returning %.1f\n" , int_param ,
88 float_param , return_value );
9- return int_param * float_param ;
9+ return return_value ;
1010}
1111
Original file line number Diff line number Diff line change 44
55float cppmult (int int_param, float float_param) {
66 float return_value = int_param * float_param;
7- printf (" In cppmul: int: %d float %.1f returning %.1f\n " , int_param,
8- float_param, return_value);
9- return int_param * float_param;
7+ std::cout << std::setprecision (1 ) << std::fixed
8+ << " In cppmul: int: " << int_param
9+ << " float " << float_param
10+ << " returning " << return_value
11+ << std::endl;
12+ return return_value;
1013}
1114
You can’t perform that action at this time.
0 commit comments