Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
Download FILM LETS GO APE
-
Contoh Penggunaan IF untuk Menentukan Bilangan Prima Contoh Penggunaan IF untuk Menentukan Tahun Kabisat
-
Input / Output Menentukan Bilangan Prima Prosedur dan Fungsi Menentukan Tahun Kabisat Menentukan Luas Segitiga Dengan Const...
-
Faktorial dari bilangan asli n adalah hasil perkalian antara bilangan bulat positif yang kurang dari atau sama dengan...
-
#include<stdio.h> #include<math.h> #include<conio.h> float determinant(float a[25][25],float k); void cofactor(float...
-
package rekursifaktorial; class Rekursi{ int Faktorial(int F){ if(F==0){ return 1; } else{ ...
-
Contoh Penggunaan Prosedur di Java Menentukan Luas Segitiga
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
Bilangan Prima adalah bilangan asli yang lebih dari satu yang tidak dapat dibagi oleh bilangan manapun kecuali o...
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:
Comments (Atom)