Antworten (1)

Asmit Singh
Asmit Singh am 1 Jun. 2021

0 Stimmen

%Number is the base number
number = 5;
ans = 1;
% n is the power to which the number needs to be raised
n = 3;
while(n~=0)
ans = ans*number;
n=n-1;
end

1 Kommentar

James Tursa
James Tursa am 1 Jun. 2021
@Asmit Singh Please do not post complete answers to homework questions.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 1 Jun. 2021

Kommentiert:

am 1 Jun. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by