Ir para conteúdo
Fórum Script Brasil

benihime

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que benihime postou

  1. Não estou conseguindo arrumar os erros depois que compilo, alguém poderia me ajudar? att B. Program mnewtonraphson; uses crt; var x0,x1,erro,eps: real; k: interger; espera: char; function f (x: real):real; begin f:= (4x+2x^2+6); end; function df (x: real):real; begin df:=(4+2x); end; begin writeln ('Método de Néwton'); writeln ('Solução Inicial'); readln (x0); writeln ('Digite a precisao'); readln(eps); writeln('x= ', x0:6:6); erro:=1; k:=0; while erro >= eps do begin x1:= x0-(f/df); writeln('x= ', x1:6:6); erro:= abs ((x1-x0)/x1); x0:=x1; k:= k+1; end; writeln (' Solucao é: ', x0:6:6); writeln('O numero de iterações é: ',k); writeln(' Pressione enter para continuar') ; end.
×
×
  • Criar Novo...