[Solved] Count problem
#1

Hy

I have a very simple code, what is dont work
So, the code:
pawn Код:
new Float:szam;
  szam = 10 / 4;
  printf("Result: %f", szam);
I cant why, but its dont work... It say 2.000000

Okey, solved... 10 is an integer number, you need use 10.0
Reply
#2

pawn Код:
new Float:szam;
szam = 10.0 / 4.0;
printf("Result: %f", szam);
Integer division will always return an integer
Reply
#3

Quote:
Originally Posted by dice7
pawn Код:
new Float:szam;
szam = 10.0 / 4.0;
printf("Result: %f", szam);
Integer division will always return an integer
Thanx, but i said its solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)