SlideShare a Scribd company logo
Listing Program
Fibonacci
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fibo;
/**
*
* @author agatha
*/
public class Fibo {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int fibo[] = new int[15];
fibo[0] = 1;
fibo[1] = 1;
for (int i = 2; i < fibo.length; i++) {
fibo[i] = fibo[i - 1] + fibo[i - 2];
}
for (int i = 0; i < fibo.length; i++) {
System.out.println(fibo[i]);
}
}
}
Bilangan Prima 1-100
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package bil_prima;
/**
*
* @author agatha
*/
public class Bil_prima {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char tanda[] = new char[101];
for (int i = 2; i <= 100; i++) {
if (tanda[i] != '*') {
System.out.print(i + " ");
for (int j = i * 2; j <= 100; j += i) {
tanda[j] = '*';
}
}
}
}
}
Matrik 3x3 Penjumlahan
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package matrik3x3;
import java.util.Scanner;
/**
*
* @author agatha
*/
public class Matrik3x3 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner(System.in);
int i;
int j;
int matrikA[][] = new int[4][4];
int matrikB[][] = new int[4][4];
int jumlah[][] = new int[4][4];
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
System.out.print("Matrik A " + i + "." + j + "= ");
matrikA[i][j] = input.nextInt();
}
}
System.out.println();
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
System.out.print("Matrik B " + i + "." + j + "= ");
matrikB[i][j] = input.nextInt();
}
}
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
jumlah[i][j] = matrikA[i][j] + matrikB[i][j];
}
}
System.out.println("n Matrik A n");
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
System.out.print(" " + matrikA[i][j]);
}
System.out.println();
}
System.out.println("nMatrik Bn");
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
System.out.print(" " + matrikB[i][j]);
}
System.out.println();
}
System.out.println("nMatrik A + Matrik Bn");
for (i = 1; i < 4; i++) {
for (j = 1; j < 4; j++) {
System.out.print(" " + jumlah[i][j]);
}
System.out.println();
}
}
}
Screenshot Program :
1. Fibonacci
2. Bilangan Prima 1-100
3. Matrik 3x3

More Related Content

What's hot

14method in c#
14method in c#14method in c#
14method in c#
Sireesh K
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#
khush_boo31
 
Python programming workshop session 2
Python programming workshop session 2Python programming workshop session 2
Python programming workshop session 2
Abdul Haseeb
 
Functional techniques in Ruby
Functional techniques in RubyFunctional techniques in Ruby
Functional techniques in Ruby
erockendude
 
Functions in C
Functions in CFunctions in C
Functions in C
Princy Nelson
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Method parameters in c#
Method parameters in c#Method parameters in c#
Method parameters in c#
Dr.Neeraj Kumar Pandey
 
Python Lecture 4
Python Lecture 4Python Lecture 4
Python Lecture 4
Inzamam Baig
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
Saket Pathak
 
Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++
NUST Stuff
 
Functions (Computer programming and utilization)
Functions (Computer programming and utilization)Functions (Computer programming and utilization)
Functions (Computer programming and utilization)
Digvijaysinh Gohil
 
Functions in c
Functions in cFunctions in c
Functions in c
Innovative
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
Abdul Haseeb
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
Abu Zaman
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
Ds lab manual by s.k.rath
Ds lab manual by s.k.rathDs lab manual by s.k.rath
Ds lab manual by s.k.rathSANTOSH RATH
 
Lecture#9 Arrays in c++
Lecture#9 Arrays in c++Lecture#9 Arrays in c++
Lecture#9 Arrays in c++
NUST Stuff
 
P3
P3P3
P3
lksoo
 
Bakery Algorithm
Bakery Algorithm Bakery Algorithm
Bakery Algorithm
thededar
 

What's hot (20)

14method in c#
14method in c#14method in c#
14method in c#
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#
 
Ds lab handouts
Ds lab handoutsDs lab handouts
Ds lab handouts
 
Python programming workshop session 2
Python programming workshop session 2Python programming workshop session 2
Python programming workshop session 2
 
Functional techniques in Ruby
Functional techniques in RubyFunctional techniques in Ruby
Functional techniques in Ruby
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Chap 5 c++
 
Method parameters in c#
Method parameters in c#Method parameters in c#
Method parameters in c#
 
Python Lecture 4
Python Lecture 4Python Lecture 4
Python Lecture 4
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
 
Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++Lecture#8 introduction to array with examples c++
Lecture#8 introduction to array with examples c++
 
Functions (Computer programming and utilization)
Functions (Computer programming and utilization)Functions (Computer programming and utilization)
Functions (Computer programming and utilization)
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
 
Ds lab manual by s.k.rath
Ds lab manual by s.k.rathDs lab manual by s.k.rath
Ds lab manual by s.k.rath
 
Lecture#9 Arrays in c++
Lecture#9 Arrays in c++Lecture#9 Arrays in c++
Lecture#9 Arrays in c++
 
P3
P3P3
P3
 
Bakery Algorithm
Bakery Algorithm Bakery Algorithm
Bakery Algorithm
 

Viewers also liked

Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - NetbeansLaporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - NetbeansMelina Krisnawati
 
Multimedia 2D (Game) - Puzzle alphabet
Multimedia 2D (Game) - Puzzle alphabetMultimedia 2D (Game) - Puzzle alphabet
Multimedia 2D (Game) - Puzzle alphabet
Melina Krisnawati
 
Pemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchPemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchMelina Krisnawati
 
Genius it ians™ 8085 programming (part 2)
Genius it ians™  8085 programming (part 2)Genius it ians™  8085 programming (part 2)
Genius it ians™ 8085 programming (part 2)
Manoj Shahu
 
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Melina Krisnawati
 
Java (Netbeans) - Looping - Object Oriented Programming
Java (Netbeans) - Looping - Object Oriented ProgrammingJava (Netbeans) - Looping - Object Oriented Programming
Java (Netbeans) - Looping - Object Oriented ProgrammingMelina Krisnawati
 
Aplikasi sistem informasi pada fungsi fungsi organisasi
Aplikasi sistem informasi pada fungsi   fungsi organisasiAplikasi sistem informasi pada fungsi   fungsi organisasi
Aplikasi sistem informasi pada fungsi fungsi organisasi
Melina Krisnawati
 
Konsep & storyboard game multimedia (puzzle alphabet)
Konsep & storyboard game multimedia (puzzle alphabet)Konsep & storyboard game multimedia (puzzle alphabet)
Konsep & storyboard game multimedia (puzzle alphabet)
Melina Krisnawati
 
Algoritma - Array
Algoritma - ArrayAlgoritma - Array
Algoritma - Array
Melina Krisnawati
 
Laporan praktikum 2 - Sistem Operasi - internal command - copy con, rename,...
Laporan praktikum 2  - Sistem Operasi -  internal command - copy con, rename,...Laporan praktikum 2  - Sistem Operasi -  internal command - copy con, rename,...
Laporan praktikum 2 - Sistem Operasi - internal command - copy con, rename,...
Melina Krisnawati
 
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)Melina Krisnawati
 
menu strip - visual basic
menu strip - visual basicmenu strip - visual basic
menu strip - visual basic
Melina Krisnawati
 
Java (Netbeans) - Abstract & Interface - Object Oriented Programming
Java (Netbeans) - Abstract & Interface - Object Oriented ProgrammingJava (Netbeans) - Abstract & Interface - Object Oriented Programming
Java (Netbeans) - Abstract & Interface - Object Oriented ProgrammingMelina Krisnawati
 
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell DivisionAlgorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
Fibonacci Phyllotaxis
 
Java (Netbeans) - Exception handling - Object Oriented Programming
Java (Netbeans) - Exception handling - Object Oriented ProgrammingJava (Netbeans) - Exception handling - Object Oriented Programming
Java (Netbeans) - Exception handling - Object Oriented ProgrammingMelina Krisnawati
 
makalah sistem operasi - android vd ios
makalah sistem operasi - android vd iosmakalah sistem operasi - android vd ios
makalah sistem operasi - android vd iosMelina Krisnawati
 
Laporan Praktikum - Sistem Operasi - Perintah Internal Command
Laporan Praktikum - Sistem Operasi - Perintah Internal CommandLaporan Praktikum - Sistem Operasi - Perintah Internal Command
Laporan Praktikum - Sistem Operasi - Perintah Internal Command
Melina Krisnawati
 
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Melina Krisnawati
 
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)Melina Krisnawati
 

Viewers also liked (20)

Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - NetbeansLaporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
 
Tugas algoritma faktorial
Tugas algoritma   faktorialTugas algoritma   faktorial
Tugas algoritma faktorial
 
Multimedia 2D (Game) - Puzzle alphabet
Multimedia 2D (Game) - Puzzle alphabetMultimedia 2D (Game) - Puzzle alphabet
Multimedia 2D (Game) - Puzzle alphabet
 
Pemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchPemrograman Mobile - Try Catch
Pemrograman Mobile - Try Catch
 
Genius it ians™ 8085 programming (part 2)
Genius it ians™  8085 programming (part 2)Genius it ians™  8085 programming (part 2)
Genius it ians™ 8085 programming (part 2)
 
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
 
Java (Netbeans) - Looping - Object Oriented Programming
Java (Netbeans) - Looping - Object Oriented ProgrammingJava (Netbeans) - Looping - Object Oriented Programming
Java (Netbeans) - Looping - Object Oriented Programming
 
Aplikasi sistem informasi pada fungsi fungsi organisasi
Aplikasi sistem informasi pada fungsi   fungsi organisasiAplikasi sistem informasi pada fungsi   fungsi organisasi
Aplikasi sistem informasi pada fungsi fungsi organisasi
 
Konsep & storyboard game multimedia (puzzle alphabet)
Konsep & storyboard game multimedia (puzzle alphabet)Konsep & storyboard game multimedia (puzzle alphabet)
Konsep & storyboard game multimedia (puzzle alphabet)
 
Algoritma - Array
Algoritma - ArrayAlgoritma - Array
Algoritma - Array
 
Laporan praktikum 2 - Sistem Operasi - internal command - copy con, rename,...
Laporan praktikum 2  - Sistem Operasi -  internal command - copy con, rename,...Laporan praktikum 2  - Sistem Operasi -  internal command - copy con, rename,...
Laporan praktikum 2 - Sistem Operasi - internal command - copy con, rename,...
 
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)
Laporan praktikum 3 - Sistem Operasi Internal & External Command (Lanjutan)
 
menu strip - visual basic
menu strip - visual basicmenu strip - visual basic
menu strip - visual basic
 
Java (Netbeans) - Abstract & Interface - Object Oriented Programming
Java (Netbeans) - Abstract & Interface - Object Oriented ProgrammingJava (Netbeans) - Abstract & Interface - Object Oriented Programming
Java (Netbeans) - Abstract & Interface - Object Oriented Programming
 
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell DivisionAlgorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
Algorithm - Fibonacci Phyllotaxis by Asymmetric Cell Division
 
Java (Netbeans) - Exception handling - Object Oriented Programming
Java (Netbeans) - Exception handling - Object Oriented ProgrammingJava (Netbeans) - Exception handling - Object Oriented Programming
Java (Netbeans) - Exception handling - Object Oriented Programming
 
makalah sistem operasi - android vd ios
makalah sistem operasi - android vd iosmakalah sistem operasi - android vd ios
makalah sistem operasi - android vd ios
 
Laporan Praktikum - Sistem Operasi - Perintah Internal Command
Laporan Praktikum - Sistem Operasi - Perintah Internal CommandLaporan Praktikum - Sistem Operasi - Perintah Internal Command
Laporan Praktikum - Sistem Operasi - Perintah Internal Command
 
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
 
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)
Java (Netbeans) - Class, Constructor, Object (Object Oriented Programming)
 

Similar to Tugas algoritma fibonacci

Algoritmos sujei
Algoritmos sujeiAlgoritmos sujei
Algoritmos sujei
gersonjack
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
Erika Susan Villcas
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
Erika Susan Villcas
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
Erika Susan Villcas
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
Erika Susan Villcas
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
walia Shaan
 
Estructura secuencial -garcia
Estructura secuencial -garciaEstructura secuencial -garcia
Estructura secuencial -garcia
Daneziita Laulate Flores
 
Trabajo
TrabajoTrabajo
Nested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaNested For Loops and Class Constants in Java
Nested For Loops and Class Constants in Java
Pokequesthero
 
What will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdfWhat will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdf
anavmuthu
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simple
Ateji Px
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
Ankit Gupta
 
Xamarin: C# Methods
Xamarin: C# MethodsXamarin: C# Methods
Xamarin: C# Methods
Eng Teong Cheah
 
Java_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJava_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdf
JayveeCultivo
 
Please find the required program below with output#include stdio.pdf
Please find the required program below with output#include stdio.pdfPlease find the required program below with output#include stdio.pdf
Please find the required program below with output#include stdio.pdf
anonakitchen
 

Similar to Tugas algoritma fibonacci (20)

Algoritmos sujei
Algoritmos sujeiAlgoritmos sujei
Algoritmos sujei
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Stars
StarsStars
Stars
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
 
Estructura secuencial -garcia
Estructura secuencial -garciaEstructura secuencial -garcia
Estructura secuencial -garcia
 
Trabajo
TrabajoTrabajo
Trabajo
 
Nested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaNested For Loops and Class Constants in Java
Nested For Loops and Class Constants in Java
 
What will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdfWhat will be the output from the following code if the user enters 4.pdf
What will be the output from the following code if the user enters 4.pdf
 
&Y tgs P kii for
&Y tgs P kii for&Y tgs P kii for
&Y tgs P kii for
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simple
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
Insertion Sort Code
Insertion Sort CodeInsertion Sort Code
Insertion Sort Code
 
Xamarin: C# Methods
Xamarin: C# MethodsXamarin: C# Methods
Xamarin: C# Methods
 
Java_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJava_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdf
 
Python introduction
Python introductionPython introduction
Python introduction
 
Please find the required program below with output#include stdio.pdf
Please find the required program below with output#include stdio.pdfPlease find the required program below with output#include stdio.pdf
Please find the required program below with output#include stdio.pdf
 

Recently uploaded

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 

Recently uploaded (20)

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 

Tugas algoritma fibonacci

  • 1. Listing Program Fibonacci /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fibo; /** * * @author agatha */ public class Fibo { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here int fibo[] = new int[15]; fibo[0] = 1; fibo[1] = 1; for (int i = 2; i < fibo.length; i++) { fibo[i] = fibo[i - 1] + fibo[i - 2]; } for (int i = 0; i < fibo.length; i++) { System.out.println(fibo[i]); } } }
  • 2. Bilangan Prima 1-100 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package bil_prima; /** * * @author agatha */ public class Bil_prima { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here char tanda[] = new char[101]; for (int i = 2; i <= 100; i++) { if (tanda[i] != '*') { System.out.print(i + " "); for (int j = i * 2; j <= 100; j += i) { tanda[j] = '*'; } } } } }
  • 3. Matrik 3x3 Penjumlahan /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package matrik3x3; import java.util.Scanner; /** * * @author agatha */ public class Matrik3x3 { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner input = new Scanner(System.in); int i; int j; int matrikA[][] = new int[4][4]; int matrikB[][] = new int[4][4]; int jumlah[][] = new int[4][4]; for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { System.out.print("Matrik A " + i + "." + j + "= "); matrikA[i][j] = input.nextInt(); } } System.out.println(); for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { System.out.print("Matrik B " + i + "." + j + "= "); matrikB[i][j] = input.nextInt(); } } for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { jumlah[i][j] = matrikA[i][j] + matrikB[i][j]; } } System.out.println("n Matrik A n"); for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { System.out.print(" " + matrikA[i][j]); } System.out.println(); }
  • 4. System.out.println("nMatrik Bn"); for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { System.out.print(" " + matrikB[i][j]); } System.out.println(); } System.out.println("nMatrik A + Matrik Bn"); for (i = 1; i < 4; i++) { for (j = 1; j < 4; j++) { System.out.print(" " + jumlah[i][j]); } System.out.println(); } } }
  • 5. Screenshot Program : 1. Fibonacci 2. Bilangan Prima 1-100 3. Matrik 3x3