Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
1. Insertion Sort 2. Buble Sort 3. Shell Sort 4. Quick Sort 5. Pengurutan Matriks
-
#include <stdio.h> #include <conio.h> #include <stdlib.h> void main() { int musuh,player; char ulang; rand...
-
algoritma menentukan KPK dari dua bilangan inputan user menggunakan prosedur procedure KPK(input bil1, bil2 :integer) {menentukan kpk da...
-
Pengertian Modus Modus adalah data yang paling sering muncul. Jika terdapat dua data yang memilki nilai sekaligus jumlah...
-
Contoh Penggunaan For untuk Menentukan Bilangan Prima
-
Menghitung Kombinasi Pengurutan Matriks Penjumlahan Matriks Pengurutan Buble Sort Pengurutan Insertion Pengurutan Shell ...
-
#include <stdio.h> #include <conio.h> void input(int t,int b) { if ((t>=21&&t<=31 && b==12) || (t...
-
Pengertian Modus Modus adalah data yang paling sering muncul. Jika terdapat dua data yang memilki nilai sekaligus jumlah s...
Powered by Blogger.
Labels
Lorem 1
adsense
"
});
Circle Gallery
"
});
‹
›
News
"
});
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ldecimalformat;
import java.text.DecimalFormat;
/**
*
* @author andi m
*/
public class LDecimalFormat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
DecimalFormat C=new DecimalFormat("0.00");
double A=6,B=9;
double ans=A/B;
//Sebelum pembulatan
System.out.println(ans);
//setelah pembulatan
System.out.println(C.format(ans));
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ldecimalformat;
import java.text.DecimalFormat;
/**
*
* @author andi m
*/
public class LDecimalFormat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
DecimalFormat C=new DecimalFormat("0.00");
double A=6,B=9;
double ans=A/B;
//Sebelum pembulatan
System.out.println(ans);
//setelah pembulatan
System.out.println(C.format(ans));
}
}
java - matematika
Subscribe to:
Posts (Atom)