What is wrong with this code? I’ve went through it and I can’t find the problem. z should theoretically equal .5, but in the end equals zero? I don’t know.
Here is the code:
#pragma strict
var x: int = 0;
var y: int = 0;
var z: int = 0;
function Start () {
for(var i: int = 0; i<10; i++)
{
x++;
y += 2;
z = x / y;
print(z);
}
}
function Update () {
}