View Single Post
Old 30/07/2011, 02:35 PM   #1
pen_theGun
Big Clucker
 
pen_theGun's Avatar
 
Join Date: Jan 2008
Posts: 179
Reputation: 0
Default Divide operator doesnt work properly?

Do i something wrong or does divide operator work incorrect?! Here are some examples

pawn Code:
printf( "%f", 5.0/8 ); // OK => 0.625000
printf( "%f", 5/8.0 );  // OK => 0.625000
printf( "%f", 5/8 ); // Wrong? => 0.000000
printf( "%d", 5/8 ); // Wrong? => 0

printf( "%d", 10/5 ); // OK => 2
printf( "%f", 10/5 ); // Wrong? => 0.000000
printf( "%f", float(10/5) ); // OK => 2.000000

Isnt job of print to provide me an correct output, instead of making float(10/5) etc.?
__________________



pen_theGun is offline