ios - How can I add all this into a NSLog -


i have working how make in 1 line. there place holder?

nslog(@"the value of myfraction is: " [myfraction print], [myfraction divide] );

    // [myfraction print];     // [myfraction divide]; 

print have set shows numerator , denominator (5/20) , divide divides numberator / denominator , has nslog of total.

you need use appropriate string format specifier (visit page find correct 1 needs). example, printing out 2 values floats:

nslog(@"the value of myfraction %f printed, , %f divided.", [myfraction print], [myfraction divide]); 

will print (for example):

the value of myfraction 3.45 printed, , 1.847 divided.

some quick references %@ strings, %d doubles, , %i integers.