red = Color.new(255,0,0)
green = Color.new(0,255,0)
x = 9
x2 = 9 
x3 = math.sqrt(x^3)

while true do
screen:clear()
screen:print(0,0,"press start to go back...",green)
pad=Controls.read()
oldpad=pad
x3 = math.sqrt(x^3)
x2 = (math.sqrt(x)+1)^2
if pad:up() then
	x=x2
end
if pad:right() and pad ~= oldpad then
	x=x2
end
screen:print(100,100,"Beneksturun: " .. x2,green)
screen:print(100,120,"Number cubed then squared: " .. x3, Color.new(255,0,0))
if pad:start() then
	dofile("./System/menu.lua")
	break;
end
screen.waitVblankStart()
screen.flip()
end