Показать сообщение отдельно
Старый 05.07.2006, 10:33
motor4ik вне форума Посмотреть профиль Отправить личное сообщение для motor4ik Посетить домашнюю страницу motor4ik Найти все сообщения от motor4ik
  № 2  
Ответить с цитированием
motor4ik
 
Аватар для motor4ik

Регистрация: Jun 2005
Адрес: Moscow - immigrate from Volgodonsk
Сообщений: 2,534
смотрим класс Math

Цитата:
Math class
Availability
Flash Player 5. In Flash Player 4, the methods and properties of the Math class are emulated using approximations and may not be as accurate as the non-emulated math functions supported by Flash Player 5.
Цитата:
Math.sqrt()
Computes a square root.

a^2=a*a !!
a^3=a*a *a!!

Код:
a=4;
b=1;
stepen=4;

for (i=0;i<stepen;i++){
b*=a;
}

trace(b);


Код:
function stepen(a:Number,c:Number):Void{
	var b:Number=1;
	for (i=0;i<c;i++){
		b*=a;
	}
	trace(b);
}


stepen(2,4);


Последний раз редактировалось motor4ik; 05.07.2006 в 10:35.