Java menggunakan Math

Program menghitung rumus  x ^2 * cos(45derajat) +akar(e) menggunakan Math…..

script program :

import javax.swing.JOptionPane;

public class Coba1{

            public static void main(String[]args){

            String a = JOptionPane.showInputDialog(“Silahkan input nilai X : “);

            double x = Double.parseDouble(a);

            double Hitung = Math.abs(Math.pow(x,2)*Math.cos(Math.toRadians(45)) + Math.sqrt(Math.exp(x)));

            System.out.println(“Nilai dari ” + x + “^2 * cos(45derajat) + akar(e) adalah : “+ Hitung);





About heni
I ♡ movie, traveling, fruits Worry less smile more fell happy anyway :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: