Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <stdio.h> #include <conio.h> #include <stdlib.h> void main() { int musuh,player; char ulang; rand...
-
#include <stdio.h> #include <conio.h> #include <stdlib.h> int main() { int queue[10], i, head=-1, tail=-1, enqueu...
-
pada postingan saya kali ini saya akan berbagi mengenai kodingan list linear lengkap dengan bahasa C #include"stdio.h" #includ...
-
Faktorial dari bilangan asli n adalah hasil perkalian antara bilangan bulat positif yang kurang dari atau sama dengan...
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
kali ini saya akan berbagi program penjumlahan matriks dengan bahasa c #include<stdio.h> #include<conio.h> int main() { ...
-
#include <iostream> #include <conio.h> using namespace std; main (void) { string username; int password; ...
-
Contoh Kombinasi Misalkan dalam suatu tim terdapat 4 orang alhli statistik yang sedang melakukan proyek survey. Dalam pr...
-
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:
Posts (Atom)