0
Setting decimal as increment in for loop. Is there a way to set increment of the value by a decimal? Eg. (x=0, x<=10, x+=0.25)
2 Respostas
+ 6
//It works :D
public class Program
{
public static void main(String[] args) {
double x;
for(x=0;x<10;x+=0.25)
System.out.println(x);
}
}
0
yes you can do it!!