problemino
Posted by alfoguasta on 10-12-2005 11:28
perchè se inserisco per y=15 la x al termine del programma mi viene 4?
import prog.io.*;
class Asd {
static public void main(String[] args) {
ConsoleOutputManager video = new ConsoleOutputManager();
ConsoleInputManager tastiera = new ConsoleInputManager();
int x, y;
y= tastiera.readInt();
x=0;
while ((x*x)<y)
x++;
video.println(x);
}
}
Powered by: vbHome (lite) v3.8 and vBulletin v2.3.1
Copyright © 2000 - 2002 Jelsoft Enterprises Limited