Membuat Perkalian Deret Bilangan Genap di Java

Diposting pada 2.156 views

Contoh perkalian deret bilangan genap :

output:
2*4*6*8*10*12=46080

Coding

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package allaboutalgoritma;
import java.util.Scanner;
/**
*
* @author dimata005
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

int i, j, min, jum;

boolean prima;
Scanner input = new Scanner(System.in);

System.out.print(“Masukkan nilai batas awal: “);
min = input.nextInt();
j=2;
//System.out.print(2);//<<j;
for (i=2;i<=min;i=i+2)
{
if(i==2){
System.out.print(2);//<<j;
}else{
System.out.print(” * “);
System.out.print(i);//<<j;
j = j * i;
}
}
System.out.println(“tt= “+j);//”tt= “<<jum<<endl;
}

}

8 thoughts on “Membuat Perkalian Deret Bilangan Genap di Java

  1. http://www.indobet77.com

    Master Agen Bola , Casino , Tangkas , Togel Terbesar
    dan Terpercaya Pilihan Para Bettor

    New Promo ( khusus produk 998bet )
    – Bonus 100 % New Member sportsbook ( 998 bet ) .
    – Bonus 100 % New Member Casino ( 998 bet ) .
    ( Syarat dan Ketentuan Berlaku )

    Promo Terbaru :
    – Bonus 10% New Member Sportsbook ( SBObet, IBCbet , AFB88 ,368bet , M8bet , 998bet )
    – Bonus 5% New Member Casino Online ( 338a , 1Scasino , Asia8bet , CBO855 )
    – Bonus 10% Setiap Hari Bola Tangkas ( TangkasNet , 368MM , 88 Tangkas )
    – Togel Online ( Klik4D )
    – Sabung Ayam ( New Produk )
    – CASHBACK untuk Member
    – BONUS REFERRAL 5% + 1% Seumur Hidup

    untuk Informasi lebih jelasnya silahkan hubungi CS kami :
    – YM : indobet77_sb2@yahoo.com
    – EMAIL : indobet77@gmail.com
    – WHATSAPP : +63 905 213 7238
    – WECHAT : indobet77
    – SMS CENTER : +63 905 213 7238
    – PIN BB : 2B65A547 / 24CC5D0F

    Salam Admin ,
    http://indobet77.com/

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *