Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <iostream> #include <conio.h> using namespace std; main (void) { string username; int password; ...
-
Bilangan Prima adalah bilangan asli yang lebih dari satu yang tidak dapat dibagi oleh bilangan manapun kecuali o...
-
kali ini saya akan berbagi source code program faktor persekutuan besar (FPB) dengan bahasa C dan C++ #include <stdio.h> #include ...
-
kali ini saya akan berbagi kodingan pengurutan dengan metode quick sort. semoga bermanfaat... #include <stdio.h> void quickSort( ...
-
#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
-
Kombinasi adalah menggabungkan beberapa objek dari suatu kumpulan tanpa memperhatikan urutannya. Oleh karena itu,...
-
#include <stdio.h> #include <conio.h> main() { int baris; printf("Masukkan banyak baris : ");scanf("...
-
#include <stdio.h> #include <conio.h> void KPK(int a,int b); main() { int a,b; printf("masukkan angka : ")...
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)