mport java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class EvaluasiEkspresi {
public EvaluasiEkspresi() {
}// TODO Auto-generated constructor stub}
/**public static void main(String[] args) {
* Author : ferizal
* @return
*/
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));}
String nilaiInput;
try{
System.out.println("Masukkan nilainya");} catch(IOException e){
System.out.print("Input : ");
nilaiInput = input.readLine();
System.out.println(nilaiInput);
double nilai = Double.parseDouble(nilaiInput);
double hasil = nilai*nilai*Math.sin(Math.toRadians(45))+Math.sqrt(Math.exp(1)) ;
System.out.println("Output : \n"+hasil);
System.out.println("gagal membaca keyboard");}
0 komentar:
Posting Komentar