I have a problem with a program on greenfoot.ask I do a sum and I must return a correct answer or incorreta but to run it just gives me the answer wrong but this good
public class botones extends Actor
{
/**
* Act - do whatever the botones wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
}
public void emp()
{
World myw = getWorld();
int x=(myw.getWidth());
int y=(myw.getHeight());
Greenfoot.isKeyDown("space");
if (Greenfoot.isKeyDown("space")){
myw.addObject (new uno(),100, 200);
myw.addObject (new dos(),400, 200);
}
}
public void questioin()
{
if (Greenfoot.isKeyDown("space")){
World myw = getWorld();
int x=(myw.getWidth());
int y=(myw.getHeight());
int preg= Integer.parseInt(Greenfoot.ask("answer?"));
if(preg == '3')
{
myw.addObject (new good(),690, 200);
}
else
{
myw.addObject (new bad (),690, 200);
System.out.println(preg);
}
}
}
}

