Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  hgjjfj
Language: PASCAL
Code:
program potencia (inpur,output);
{potencia n-esima de un nĂºmero}
VAR 
    indice,exp:integer;
    base,potencia:real;
BEGIN
    writeln('Introduce la base:');
    readln(base);
    writeln('Introduce el exponente (entero):');
    readln(exp);
    potencia:=1;
    FOR indice=1 TO indice=exp DO
        potencia:= potencia*base;
    writeln('potencia=',potencia);
END.
Comments: