Está en la página 1de 5

Step 1 : set i=1, ai=i, n=20

Step 2 : hitung i=
Hitung i=ai-i*Ci-1
Step 3 : apakah i=n jika tidak i=i+1 ke step 2 jika ya ke step 4
Step 4 : yi=di
Step : hitung yi=di-i * yi-1
Step ! : apakah i=n jika tidak i=i+1 ke step jika ya ke step "
Step " : #n=
Step $ : #i-1=
Step % : i=n-1 jika tidak i=i+1 ke step $ jika ya ke step 10
Step 10 : k&'putasi se(esai
#include <iostream>
using namespace std;
{
float beta
{
result=b/alfa
return result
}
float alfa
{
result=a-beta*c
return result
}
float y
result=d-beta*y
return result
float x
{
result=(y-c*x/alfa
return result
}
int main (
alfa!"a!"y!"d!"xn"yn"alfan"n;
alfa! = a!;
y!=d!;
xn=yn/alfan;
n=#
$%ile (i=n
{
i&&
}
$%ile (i=n-!
{
i&&
}
return '
endl
}
'u(ai
#include <iostream>
using namespace std
{
float f(x
{
result = (*x*x*x*x&)*x*x&*
return result
}
int main (
i"+",!",*",)"y"x"%"b"a"yo;
%=b-a/+;
x=a&i*%;
,!=f(x"y;
,*=f(x&%/*"y&%/**,!;
,)=f(x&%"y-,!*%&**,**%;
y=yo&%/-*(,!&(*,*&,);
$%ile (i=+
{
i&&
}
return'
endl
}
#include <iostream>
using namespace std;
{
float f(x
{
result=(*x*x&#*x&)
return result
}
float f.(x
{
result=/*x&#
return result
}
int main (
i"xo"eps"galat"x;
i=';
xo=';
eps='0''''!;
galat=abs(x-xo;
x=xo-f(x/f.(x;
$%ile (galat<error;
{
i&&
}
return'
endl
}