EnglishFrenchGermanSpainItalianDutchPortugueseRussianKoreanJapaneseArabic Chinese Simplified

Tuesday, April 19, 2011

Power series determinan (jeliot 3)

import jeliot.io.*;

public class calculate {

    public void input(){
    System.out.println("specify the value n:");
    n=Input.readInt();
    }
    public void proses(){
           jumlah=0;
           total=0;
           rumus=-1;
    for(int j=1; j<=n; j++)
     {
     rumus=(rumus*(-1));
     total=rumus/j;
     jumlah+=total;
     if(j==1)
     System.out.println(+total);
     if(j>1)
     System.out.println(+total);
   
     System.out.println("hasil penjumlahan deret = "+jumlah);
     }
     }
private int n;
private float rumus,jumlah,total;

    public static void main() {
       hitung h=new calculate();
       h.input();
       h.proses();

    }
}

Artikel Terkait:

Comments :

0 comments to “Power series determinan (jeliot 3)”

Post a Comment

 

Copyright © 2009 by Learn Technology

Template by Blogger Templates | Powered by Blogger