Terangi Jiwamu dengan Kata kata ilmiah


Invers adalah kebalikan
lawannya kebalikan apa ya???

singkatnya sih pengertian invers itu, tp kalu kita jabarkan banyak sekali macam-macam fungsi invers,
disini kita akan membuat fungsi f(x) dan g(x) yang nantinya fungsi f(x) dan g(x) akan kita invers kan hasilnya

untuk implementasinya kita gunakan bahasa java

coding
fungsi.java

import java.io.*;
public class fungsi
{

public static void main(String[] args) throws Exception
{
DataInputStream input=new DataInputStream(System.in);
System.out.print(“masukan banyak koordinat= “);
int jum= Integer.parseInt(input.readLine());
int x[]=new int[jum];
for (int i=0;i<jum;i++)
{
System.out.print(“masukan elemen x ke-“+(i+1)+”; “);
x[i]=Integer.parseInt(input.readLine());
}
int yf[]= new int[jum];
for (int i=0;i<jum;i++)
{
yf[i]=x[i]*x[i]+x[i]+1;;
}
int yg[]= new int[jum];
for (int i=0;i<jum;i++)
{
yg[i]=x[i]*x[i]+x[i]+1;;
}
int yfg[]= new int[jum];
for (int i=0;i<jum;i++)
{
yfg[i]=yg[i]*yg[i]+yg[i]+1;
}
int ygf[]= new int[jum];
for (int i=0;i<jum;i++)
{
ygf[i]=yf[i]*yf[i]+yf[i];
}
System.out.println(“fungsi f(x)=x^2+x+1”);
System.out.println(“fungsi g(x)=x^2+3”);
System.out.print(“maka f(x)= (“);
for(int i=0;i<jum;i++)
{
System.out.print(yf[i]);
if(i!=jum-1)
{
System.out.print(“,”);
}
}
System.out.print(“)\n”);
System.out.print(“maka g(x)=(“);
for(int i=0;i<jum;i++)
{
System.out.print(yg[i]);
if(i!=jum-1)
{
System.out.print(“,”);
}
}
System.out.print(“)\n”);
System.out.print(“maka fog(x)=(“);
for(int i=0;i<jum;i++)
{
System.out.print(yfg[i]);
if(i!=jum-1)
{
System.out.print(“,”);
}
}
System.out.print(“)\n”);
System.out.print(“maka gof(x)=(“);
for(int i=0;i<jum;i++)
{
System.out.print(ygf[i]);
if(i!=jum-1)
{
System.out.print(“,”);
}
}
System.out.print(“)\n”);
System.out.print(“maka relasinya terhadap fungsi f(x);\n”);
for(int i=0;i<jum;i++)
{
System.out.println(“(“+x[i]+”,”+yf[i]+”)”);
}
System.out.print(“maka invers terhadap fungsi f(x):\n”);
for(int i=0;i<jum;i++)
{
System.out.println(“(“+yf[i]+”,”+x[i]+”)”);
}
System.out.print(“maka relasinya terhadap fungsi g(x);\n”);
for(int i=0;i<jum;i++)
{
System.out.println(“(“+x[i]+”,”+yg[i]+”)”);
}
System.out.print(“maka invers terhadap fungsi g(x):\n”);
for(int i=0;i<jum;i++)
{
System.out.println(“(“+yg[i]+”,”+x[i]+”)”);
}
}
}

Untuk download Listing nya klik disini
dan untuk Logika programnya klik disini

Comments on: "Membuat Fungsi Invers dari nilai fungsi dengan java" (2)

  1. okey… tx yo..

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Tag Cloud

%d bloggers like this: