Business

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Wednesday, 1 July 2015

Pemrograman (Metode Pembuatan Matriks)

#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
#include<iostream.h>
#include<math.h>
main()
{
int A[10][10];
int B[10][10];
int C[10][10];
int temp;
int a1,b1,a,b,c;
char P;
cout<<endl;

cout<<endl;
cout<<endl;
cout<<"====================================================";cout<<endl;
cout<<"                 TUGAS ANALISIS NUMERIK             ";cout<<endl;
cout<<"                    OPERASI MATRIKS                 ";cout<<endl;
cout<<"=====================================================";cout<<endl;
cout<<endl;

textcolor(9);cprintf("   TAMPILAN MATRIKS A DAN MATRIK B   ");cout<<endl;
cout<<endl;
cout<<" Masukkan jumlah kolom matriks=";cin>>a1;
cout<<" Masukkan jumlah baris matriks=";cin>>b1;
cout<<endl;
cout<<"\n Input Elemen Martriks A : \n";
for( a=1;a<=a1;a++)
    {
for( b=1;b<=b1;b++)
    {
cout<<" masukkan elemen ke ("<<a<<","<<b<<")= ";
cin>>A[a][b];
}
}
textcolor(13);cprintf("\n Martriks A \n");cout<<endl;
for( a=1;a<=a1;a++)
    {
for( b=1;b<=b1;b++)
    {
cout<<A[a][b];
cout<<"     ";
}
cout<<endl;
}
cout<<endl;
cout<<" Masukkan jumlah kolom matriks=";cin>>a1;
cout<<" Masukkan jumlah baris matriks=";cin>>b1;
cout<<endl;
cout<<"\n Input Elemen Martriks B : \n";
for( a=1;a<=a1;a++)
    {
for( b=1;b<=b1;b++)
    {
cout<<" masukkan elemen ke ("<<a<<","<<b<<")= ";
cin>>B[a][b];
}
}
textcolor(12);cprintf("\n Martriks B \n");cout<<endl;
for( a=1;a<=a1;a++)
    {
for( b=1;b<=b1;b++)
    {
cout<<A[a][b];
cout<<"     ";
}
cout<<endl;
}
cout<<endl;
textcolor(15);cprintf(" Pilihan Operasi Matriks : ");cout<<endl;
textcolor(15);cprintf(" 1. (+) Penjumlahan ");cout<<endl;
textcolor(15);cprintf(" 2. (-) Pengurangan ");cout<<endl;
textcolor(15);cprintf(" 3. (T) Transpose ");cout<<endl;
textcolor(15);cprintf(" 4. (*) Perkalian ");cout<<endl;
textcolor(15);cprintf(" Ingin operasi matriks dengan simbol yang mana?  ");cin>>P;
if(P=='+')
{
cout<<endl;
textcolor(9);cprintf("   Penjumlahan Matriks (A + B) : ");cout<<endl;
textcolor(9);cprintf("\n Matriks C \n");cout<<endl;
for ( a=1;a<=a1;a++)
    {
for ( b=1;b<=b1;b++)
   {
   C[a][b]=(A[a][b])+(B[a][b]);
    printf(" %4d ",C[a][b]);
}
cout<<endl;
}
}
else if(P=='-')
{
cout<<endl;
textcolor(11);cprintf("   Pengurangan Matriks (A - B) : ");cout<<endl;
textcolor(11);cprintf("\n   Matriks C \n");cout<<endl;
for ( a=1;a<=a1;a++)
    {
for ( b=1;b<=b1;b++)
   {
    C[a][b]=(A[a][b])-(B[a][b]);
    printf(" %4d ",C[a][b]);
}
cout<<endl;
}
}
else if (P=='T')
{
cout<<endl;
textcolor(12);cprintf("      TRANSPOSE Martriks A : ");cout<<endl;
for( a=1;a<=b1;a++)
    {
for( b=1;b<=a1;b++)
    {
    cout<<A[b][a];
    cout<<"     ";
}
cout<<endl;
}
cout<<endl;
textcolor(12);cprintf("     TRANSPOSE Martriks B : ");cout<<endl;
for( a=1;a<=b1;a++)
    {
for( b=1;b<=a1;b++)
    {
    cout<<B[b][a];
    cout<<"     ";
}
cout<<endl;
}
}
else if(P=='*')
{
cout<<endl;
textcolor(13);cprintf("   Perkalian Matriks (A x B) : ");cout<<endl;
cout<<endl;
cout<<"\Matriks C \n";
for ( a=1;a<=a1;a++)
    {
for ( b=1;b<=b1;b++)
    {
C[a][b]=0;
for ( c=1;c<=b1;c++)
    {
temp=A[a][c]*B[c][b];
C[a][b]=C[a][b]+temp;
}
}
}
cout<<endl;
for ( a=1;a<=a1;a++)
    {
for ( b=1;b<=b1;b++)
    {
    cout<<C[a][b];
    cout<<"  ";
}
cout<<endl;
}
}
getche();
}

Pemrograman (Metode Secant)

 Metode Secant
#include<iostream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define epsilon 1E-15

main()
{
int it;
long double x[100],fx[100],fs;

textcolor(10);cprintf(" Nama  : Asrul Maiwa");cout<<endl;
textcolor(10);cprintf(" NIM   : 1312140015");cout<<endl;
textcolor(10);cprintf(" Kelas : SAINS(C)");cout<<endl;
textcolor(2);cprintf("================================================");cout<<endl;
textcolor(12);cprintf("               METODE   SECANT                 ");cout<<endl;
textcolor(2);cprintf("================================================");cout<<endl;
cout<<endl;
textcolor(12);cprintf("  1.  1+x-tan(x)= 0");cout<<endl;
cout<<endl;
textcolor(10);cprintf("================================================");cout<<endl;
textcolor(10);cprintf("|");
printf(" Iterasi ");
textcolor(10);cprintf("|");
printf("     x     ");
textcolor(10);cprintf("|");
printf("    f(x)   ");
textcolor(10);cprintf("|");
printf(" KETERANGAN ");
textcolor(10);cprintf("|");cout<<endl;
textcolor(10);cprintf("================================================");cout<<endl;
it=0;
x[it]=1;
fx[it]=1+x[it]-tan(x[it]*3.14/180);

textcolor(10);cprintf("|");
printf(" %4d    ",it);
textcolor(10);cprintf("|");
printf("%10.2Le ",x[it]);
textcolor(10);cprintf("|");
printf("%10.2Le ",fx[it]);
textcolor(10);cprintf("|");
printf("            ");
textcolor(10);cprintf("|");cout<<endl;
it=1;
x[it]=2;
fx[it]=1+x[it]-tan(x[it]*3.14/180);
textcolor(10);cprintf("|");
printf(" %4d    ",it);
textcolor(10);cprintf("|");
printf("%10.2Le ",x[it]);
textcolor(10);cprintf("|");
printf("%10.2Le ",fx[it]);
textcolor(10);cprintf("|");
printf("            ");
textcolor(10);cprintf("|");cout<<endl;
do
{
it+=1;
x[it]=x[it-1]-((fx[it-1]*(x[it-1]-x[it-2]))/(fx[it-1]-fx[it-2]));
fx[it]=1+x[it]-tan(x[it]*3.14/180);
fs=fabs(x[it]-x[it-1]) ;
textcolor(10);cprintf("|");
printf(" %4d    ",it);
textcolor(10);cprintf("|");
printf("%10.2Le ",x[it]);
textcolor(10);cprintf("|");
printf("%10.2Le ",fx[it]);
textcolor(10);cprintf("|");

if(fs<=epsilon)
{
printf("   SELESAI  ");
}
else
{
printf("   LANJUT   ");
}
textcolor(10);cprintf("|");
cout<<endl;

if(it % 2 == 0 )
{
textcolor(10);cprintf("|");
textcolor(2);cprintf("      Nilai Akar : %20.13Le", x[it]);
textcolor(10);cprintf("       |");cout<<endl;

}
}
while(it<=90 && fs>=epsilon);
textcolor(10);cprintf("================================================");cout<<endl;
cout<<endl;

textcolor(12);cprintf(" Nilai Akar : %20.13Le", x[it]);cout<<endl;
printf("   Selesai Pada Iterasi Ke- %d",it);cout<<endl;

getche();
}

Pemrograman (Metode Newton Rapshon)

#include<iostream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define epsilon 1E-15
main()
{
int p,it;
char lagi;
long double x, fx, f_x,fs,xl,fxl,f_xl;
awal:
clrscr();

textcolor(10);cprintf("========================================================================");cout<<endl;
textcolor(12);cprintf("                            NEWTON RAPHSON                              ");cout<<endl;
textcolor(10);cprintf("========================================================================");cout<<endl;
cout<<endl;
cout<<endl;
printf("Soal-soal dengan penyelesaian Metode Newton Repson : ");cout<<endl;
cout<<endl;
textcolor(12);cprintf("1. 3x-cos(x)=0");cout<<endl;
textcolor(12);cprintf("2. tan(x)=1-x");cout<<endl;
cout<<endl;
cout<<endl;
textcolor(10);cprintf("Ingin Jawaban Nomer Berapa ? ");cin>>p;cout<<endl;

if(p==1)
{
   clrscr();
    textcolor(2);cprintf("============================================================");cout<<endl;
    textcolor(12);cprintf("                     NEWTON  RAPHSON                       ");cout<<endl;
    textcolor(2);cprintf("============================================================");cout<<endl;
    cout<<endl;
    textcolor(12);cprintf("  Soal No. 1. 3x-cos(x)=0");cout<<endl;
   cout<<endl;
    textcolor(10);cprintf("==============================================================");cout<<endl;
    textcolor(10);cprintf("|");
    printf(" Iterasi ");
    textcolor(10);cprintf("|");
    printf("     x     ");
    textcolor(10);cprintf("|");
    printf("    f(x)   ");
    textcolor(10);cprintf("|");
    printf("   f'(x)   ");
    textcolor(10);cprintf("|");
    printf(" KETERANGAN ");
    textcolor(10);cprintf("|");cout<<endl;
    textcolor(10);cprintf("============================================================");cout<<endl;

    it=0;
    x=1;
    fx=(3*x)-cos(x*3.14/180);
    f_x=(3+sin(x*3.14/180));
    textcolor(10);cprintf("|");
    printf(" %4d    ",it);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",x);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",fx);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",f_x);
    textcolor(10);cprintf("|");
    printf("            ");
    textcolor(10);cprintf("|");cout<<endl;

    do
    {
    it+=1;
    xl=x-(fx/f_x);
    fxl=(3*xl)-cos(xl*3.14/180);
    f_xl=(3+sin(xl*3.14/180));
    fs=fabs(xl-x);

    textcolor(10);cprintf("|");
    printf(" %4d    ",it);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",xl);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",fxl);
    textcolor(10);cprintf("|");
    printf("%10.2Le ",f_xl);
    textcolor(10);cprintf("|");

    x=xl;
    fx=fxl;
    f_x=f_xl;

    if(fs<=epsilon)
    {
    textcolor(12);cprintf("   SELESAI  ");
    }
    else
    {
    printf("   LANJUT   ");
    }
    textcolor(10);cprintf("|");
    cout<<endl;
    }
    while(it<=90 && fs>=epsilon);
    textcolor(10);cprintf("============================================================");cout<<endl;
    cout<<endl<<endl;

    printf("   Nilai Akar : %20.17Le",xl);cout<<endl;
    printf("   Selesai Pada Iterasi Ke- %d",it);cout<<endl;

    textcolor(2);cprintf(" Masih Mau dengan Soal yang Lainnya ? [Y/T] : \n");

    lagi=getche();
    if(lagi=='Y' || lagi=='y')
    goto awal;

    getche();
    }
else if(p==2)
{
clrscr();
textcolor(2);cprintf("============================================================");cout<<endl;
textcolor(12);cprintf("                     NEWTON  RAPHSON                       ");cout<<endl;
textcolor(2);cprintf("============================================================");cout<<endl;
cout<<endl;
textcolor(12);cprintf("  Soal No. 2 : tan(x)=1-x");cout<<endl;
textcolor(10);cprintf("============================================================");cout<<endl;
textcolor(10);cprintf("|");
printf(" Iterasi ");
textcolor(10);cprintf("|");
printf("     x     ");
textcolor(10);cprintf("|");
printf("    f(x)   ");
textcolor(10);cprintf("|");
printf("   f'(x)   ");
textcolor(10);cprintf("|");
printf(" KETERANGAN ");
textcolor(10);cprintf("|");cout<<endl;
textcolor(10);cprintf("============================================================");cout<<endl;
it=0;
x=1;
fx =tan(x*3.14/180)-1+x;
f_x= 1/pow(cos(x*3.14/180),2)+1;
textcolor(10);cprintf("|");
printf(" %4d    ",it);
textcolor(10);cprintf("|");
printf("%10.2Le ",x);
textcolor(10);cprintf("|");
printf("%10.2Le ",fx);
textcolor(10);cprintf("|");
printf("%10.2Le ",f_x);
textcolor(10);cprintf("|");
printf("            ");
textcolor(10);cprintf("|");cout<<endl;

do
{
it+=1;
xl=x-(fx/f_x);
fxl= tan(xl*3.14/180)-1+xl;
f_xl=1/pow(cos(xl*3.14/180),2)+1;

fs=fabs(xl-x);

textcolor(10);cprintf("|");
printf(" %4d    ",it);
textcolor(10);cprintf("|");
printf("%10.2Le ",xl);
textcolor(10);cprintf("|");
printf("%10.2Le ",fxl);
textcolor(10);cprintf("|");
printf("%10.2Le ",f_xl);
textcolor(10);cprintf("|");

x=xl;
fx=fxl;
f_x=f_xl;

if(fs<=epsilon)
{
textcolor(12);cprintf("   SELESAI  ");
}
else
{
printf("   LANJUT   ");
}
textcolor(10);cprintf("|");
cout<<endl;
if(it%10==0)
{
getche();
}

}
while(it<=90 && fs>=epsilon);
textcolor(10);cprintf("============================================================");cout<<endl;
cout<<endl<<endl;

printf("   Nilai Akar : %20.17Le",xl);cout<<endl;
printf("   Selesai Pada Iterasi Ke- %d",it);cout<<endl;

textcolor(2);cprintf(" Masih Mau dengan Soal yang Lainnya ? [Y/T] : \n");

lagi=getche();
if(lagi=='Y' || lagi=='y')
goto awal;

getche();
}
else
{
printf("Nomer Yang Anda Masukkan Tidak Terdaftar dalam Soal");cout<<endl;
textcolor(2);cprintf(" Masih Mau dengan Soal yang Lainnya ? [Y/T] : \n");

lagi=getche();
if(lagi=='Y' || lagi=='y')
goto awal;
}
getche();
}

Pemrograman ( Metode Titik Tetap )

Metode Titik Tetap


#include<iostream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define epsilon 1E-13

main()
{
int it;
long double x=0.921, g_x ,fs;


textcolor(12);cprintf("                     METODE TITIK TETAP                       ");cout<<endl;
textcolor(2);cprintf("==============================================================");cout<<endl;

printf(" Eror         : ");cout<<epsilon<<endl;
printf(" Nilai X awal : %2.1Le\n",x);
textcolor(10);cprintf("==============================================================");cout<<endl;
textcolor(10);cprintf("|");
printf(" Iterasi ");
textcolor(10);cprintf("|");
printf("     x     ");
textcolor(10);cprintf("|");
printf("    g(x)   ");
textcolor(10);cprintf("|");
printf("    g(x)-x   ");
textcolor(10);cprintf("|");
printf(" KETERANGAN ");
textcolor(10);cprintf("|");cout<<endl;
textcolor(10);cprintf("==============================================================");cout<<endl;

it=-1;
do
{
it+=1;
g_x = log(2)-log(sin(x));
fs=fabs(g_x -x);

textcolor(10);cprintf("|");
printf(" %4d    ",it);
 textcolor(10);cprintf("|");
printf("%10.2Le ",x);
 textcolor(10);cprintf("|");
printf("%10.2Le ",g_x);
 textcolor(10);cprintf("|");
printf("%12.5Le ",fs);
 textcolor(10);cprintf("|");

x=g_x;

if(fs>=epsilon)
{
printf("   LANJUT   ");
}
else
{
textcolor(12);cprintf("  SELESAI   ");
}
textcolor(10);cprintf("|");cout<<endl;

if(it==3)                                                                    
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==6)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==9)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==12)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==15)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==18)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==21)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==24)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==27)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==30)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==33)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==36)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==39)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==42)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==45)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==48)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==51)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==54)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==57)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==60)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==63)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}

else if(it==66)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==69)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==72)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==75)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==78)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==81)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==84)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==87)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==90)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==93)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==96)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==99)
{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
else if(it==102)

{
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;
getche();
}
}
while(it<=200 && fs>=epsilon);
textcolor(10);cprintf("==============================================================");cout<<endl;
cout<<endl<<endl;
printf("   Selesai Pada Iterasi Ke- %d",it);cout<<endl;
textcolor(12);cprintf("   Nilai X sementara =  %20.16Le",g_x);cout<<endl;

}

Pemrograman (Metode Bagi Dua )

Metode Bagi Dua  


#include<stdio.h>
#include<iomanip.h>
#include<conio.h>
#include<math.h>
#include<iostream.h>
#define epsilon 1E-13
main()
{
int it;
long double a=-1,b=2,T,fa,fb,fT,faT,e=2.718281828,KET;

cout<<"**************************************************************************";cout<<endl;
cout<<"          ANALISIS NUMERIK  / Metode Bagi Dua                              ";cout<<endl;
cout<<"**************************************************************************";cout<<endl;
printf("============================================================================");cout<<endl;
printf("| it|    a    |    b    |   f(a)  |   f(b)  |    T   |   f(T)  |f(a)f(T)| Ket |");cout<<endl;
printf("============================================================================");cout<<endl;

it=0;
fa=pow(e,a)-6*pow(a,2);
fb=pow(e,b)-6*pow(b,2);
T=(a+b)/2;
fT=pow(e,T)-6*pow(T,2);
faT=fa*fT;
printf("|%3d| %5.1Le| %5.1Le|%5.1Le |%5.1Le |%5.1Le | %5.1Le |%5.1Le |",it,a,b,fa,fb,T,fT,faT);cout<<endl;

do
{
if(faT<0)
{b=T;fT=fb;}
else
{a=T;fT=fa;}

it=it+1;
T=(a+b)/2;
fT=pow(e,T)-6*pow(T,2);
faT=fa*fT;
KET=fabs(fT);

printf("|%3d| %5.1Le| %5.1Le|%5.1Le |%5.1Le | %5.1Le | %5.1Le |%5.1Le |",it,a,b,fa,fb,T,fT,faT);
if(KET<=epsilon)
{printf("SELESAI|");}
else
{cout<<"LANJUT |";}
cout<<endl;
}
while(it<=100 && fabs(fT)>=epsilon);
printf("============================================================================");cout<<endl;
printf("==> Jadi nilai akarnya ( %3.5Le ) pada iterasi ke %3d .",T,it);

getche();
}

Pemrograman (Metode Posisi Palsu)

Pada kesempatan ini saya akan membagikan artikel mengenai Bahasa pemrograman yaitu bahasa C++  dimana dalam bahasa C++ kita sapat menjumpai Program Borland C++ yang di gunakan Misalnya kawan ada mata kuliah nya Analisa Numerik Atau Komputasi di Perguruan Tinggi yang Kawan kawan tempati. Dalam Hal ini saja akan Membagikan tentang Metode Posisi Palsu.


#include<iostream.h>
#include<iomanip.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define epsilon 1E-13     
main()
{
long double a,b,c,f_a,f_b,f_c,f_ac,ffac;
int max=100;
int it;
char lagi;

awal:
clrscr();
it=-1;
textcolor(13);cprintf("======================================");
textcolor(10);cprintf("=");
textcolor(13);cprintf("========================================");cout<<endl;
textcolor(10);cprintf("=============================");
textcolor(12);cprintf(" Metode Posisi Palsu ");
textcolor(10);cprintf("=============================");cout<<endl;
textcolor(13);cprintf("======================================");
textcolor(10);cprintf("=");
textcolor(13);cprintf("========================================");cout<<endl;
cout<<endl;
cout<<endl;
textcolor(10);cprintf("                              2");cout<<endl;
textcolor(12);cprintf(" Persamaan yang digunakan : ");textcolor(10);cprintf(" X  + X - 3");cout<<endl;cout<<endl;
textcolor(10);cprintf(" Nilai Eror : ");cout<<epsilon<<endl<<endl;
textcolor(14);cprintf("Coba Dengan");textcolor(10);cprintf(" a=1");
textcolor(14);cprintf(" dan ");textcolor(12);cprintf("b=3 ");cout<<endl;;cout<<endl;
textcolor(10);cprintf("Masukkan Nilai a : ");cin>>a;cout<<endl;
textcolor(12);cprintf("Masukkan Nilai b : ");cin>>b;cout<<endl;
cout<<endl;
   textcolor(10);cprintf("================================================================================");cout<<endl;
    textcolor(10);cprintf("|");textcolor(11);cprintf(" No ");
   textcolor(10);cprintf("|");textcolor(12);cprintf("    a    ");
   textcolor(10);cprintf("|");textcolor(13);cprintf("    b    ");
   textcolor(10);cprintf("|");textcolor(14);cprintf("    c    ");
   textcolor(10);cprintf("|");textcolor(15);cprintf("   F(a)   ");
   textcolor(10);cprintf("|");textcolor(9);cprintf("   F(b)   ");
   textcolor(10);cprintf("|");textcolor(7);cprintf("   F(c)   ");
   textcolor(10);cprintf("|");textcolor(19);cprintf(" F(a)xF(c)");
   textcolor(10);cprintf("|");cout<<endl;
    textcolor(10);cprintf("================================================================================");cout<<endl;


   do
       {

      it+=1;
      f_a=pow(a,2)+a-3;
        f_b=pow(b,2)+b-3;
       c=((a*f_b)-(b*f_a))/(f_b-f_a);
      f_c=pow(c,2)+ c-3;
      f_ac=f_a*f_c;
      ffac=fabs(f_ac);



      textcolor(10);cprintf("|");textcolor(11);cprintf("%3d ",it);
      textcolor(10);cprintf("|");textcolor(12);cprintf("%9.2Le",a);
      textcolor(10);cprintf("|");textcolor(13);cprintf("%9.2Le",b);
      textcolor(10);cprintf("|");textcolor(14);cprintf("%9.2Le",c);
      textcolor(10);cprintf("|");textcolor(15);cprintf("%10.2Le",f_a);
      textcolor(10);cprintf("|");textcolor(9);cprintf("%10.2Le",f_b);
      textcolor(10);cprintf("|");textcolor(7);cprintf("%10.2Le",f_c);
      textcolor(10);cprintf("|");textcolor(19);cprintf("%10.2Le",ffac);
      textcolor(10);cprintf("|");
      cout<<endl;
      if(f_ac<=0)
         {
         b=c,f_b=f_c;
         }
         else
         {
         a=c;f_a=f_c;
         }
         }
   while(it<=max && fabs(f_c) >= epsilon);
       if(it<=max)
       {
      textcolor(10);cprintf("================================================================================");cout<<endl;
      textcolor(10);cprintf(" Hampiran (Pendekatan) Nilai ");
      textcolor(12);cprintf("x = %2.13Le ",c);cout<<endl;
               }
      else
      {
      textcolor(10);cprintf("================================================================================");cout<<endl;
      textcolor(10);cprintf(" hampiran tidak mencukupi... tambah nilai toleransi batas ");
      cout<<endl;
        }

      textcolor(2);cprintf(" Masih Mau dengan Epsilon yang Berbeda ? [Y/T] : \n");

        lagi=getche();
        if(lagi=='Y' || lagi=='y')

        goto awal;
getche();
}

Monday, 29 June 2015

Simulasi jaringan dengan CiscoPaket Tracer


A. Simulasi jaringan dengan CiscoPaket Tracer

Jaringan Komputer merupakan sekelompok komputer yang saling berhubungan antara satu dan lainnya menggunakan protokol komunikasi melalui media komunikasi sehingga dapat saling berbagi informasi, program-program, penggunaan perangkat keras secara bersama (interkoneksi sejumlah komputer).

Latar Belakang Jaringan Komputer

• Kebutuhan akan informasi yang cepat dan akurat.

• Penggabungan antara teknologi komputer sebagai pengolah data dengan teknologi komunikasi.

Perangkat keras jaringan:

• Multi I/O

• NIC (Network Interface Card)

• Router

• Bridge

• Gateway

• Repeater

• Modem

• Media (kabel, Gelombang Radio)

• HUB

• Swicth Hub

Klasifikasi Jaringan Komputer Berdasarkan Geografis

• Local Area Network (LAN) (10m – 1 km)

• Metropolitan Area Network (MAN) (10 km)

• Wide Area Network (WAN) (100 – 1000 km)

• Jaringan Tanpa Kabel

• Internetwork (10.000 Km)

Sistem Koneksi dalam Jaringan Komputer

1. Peer to peer

Peer artinya rekan sekerja, adalah suatu model di mana setiap PC dapat memakai resource pada PC lain atau memberikan resourcenya untuk dipakai PC lain.

2. Client sever

Client hanya bisa menggunakan resource yang disediakan oleh server sesuai dengan otoritas yang diberikan oleh administrator.

Jenis Layanan client sever antara lain:

• File Server, Memberikan layanan fungsi pengelolaan file.

• Print Server, Memberikan layanan fungsi pencetakan.

• Database Server, Proses-proses fungsional mengenai database dijalankan pada mesin ini dan stasiun lain dapat minta pelayanan.

• DIP (Document Information Processing), Memberikan layanan fungsi penyimpanan, manajemen, dan pengambilan data..

Hardware jaringan computer

• Kabel

• Ethernet Card

• Hub & Switch

• Repeater

• Bridge

• Router

Kabel :

a) Twisted Pair Cable, ada dua jenis pemasangan kabel UTP yang umum digunakan, ditambah satu jenis pemasangan khusus untuk cisco router, yaitu :

• Straight Through Cable

• Cross Over Cable

b) Straight Through Cable, digunakan untuk menghubungkan beberapa unit komputer melalui perantara HUB/Switch, yang berfungsi sebagai konsetrator maupun repeater.

c) Cross over cable

d) Fiber Optic Cable, Kabel yang memiliki inti serat kaca sebagai saluran untuk menyalurkan sinyal antar terminal sering dipakai sebagai saluran BACKBONE karena kehandalannya yang tinggi dibandingkan dengan coaxial cable atau kabel UTP.

Topologi dalam jaringan



Topologi dalam jaringan 




Pengertian topologi Jaringan adalah susunan lintasan aliran data di dalam jaringan yang secara fisik menghubungkan simpul yang satu  dengan  simpul lainnya.   Berikut  ini  adalah beberapa topologi  jaringan  yang ada dan dipakai hingga saat ini, yaitu:
      Topologi Star
      Topologi Hierarchical/Tree
      Topologi Bus
      Topologi Ring
      Topologi Daisy Chain (Linear)
      Topologi Mesh dan Full Connected

Konsep Dasar Protokol TCP/IP
      Merupakan Sekumpulan protokol yang terdapat di dalam jaringan komputer yang digunakan untuk berkomunikasi atau bertukar data antar komputer.
      Merupakan protokol standart pada jaringan internet yang menghubungkan banyak komputer yang berbeda jenis mesin maupun sistem operasi agar dapat berinteraksi satu sama lain.

Layanan TCP/IP
      Pengiriman file (File Transfer).
      Remote Login. Computer Mail.           
      Network File System (NFS).
      Remote Execution
      Name Servers.
      IRC (Internet Relay Chat).
      Streaming (Layanan audio dan video).
IP Versi 4
      IP Address merupakan pengenal yang digunakan untuk memberi alamat pada tiap-tiap komputer dalam jaringan.
      Format IP Address adalah bilangan 32 bit yang tiap 8 bitnya dipisahkan oleh tanda titik.
      Format IP Address dapat berupa biner (xxxxxxxx.xxxxxxx.xxxxxxxx.xxxxxxx) atau berupa bilangan desimal yang masing-masing dipisahkan oleh titik (dotted decimal) (xxx.xxx.xxx.xxx)
       
Format IP Address
      IP address merupakan bilangan biner 32 bit yang dipisahkan oleh tanda pemisah berupa tanda titik disetiap 8 bitnya.
      Tiap 8 bit ini disebut dengan oktet.
      Bentuk dari IP address adalah sebagai berikut :
            xxxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
            10000100.01011100.01111001.00000001
                        132      92        121      1
Classfull Addressing
            Merupakan metode pembagian IP berdasarkan kelas dimana IP Address dibagi menjadi 5 kelas
      Kelas A
      Kelas B
      Kelas C
      Kelas D
      Kelas E 

Sumber : Google.com