SlideShare une entreprise Scribd logo
1  sur  5
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

Contenu connexe

Tendances

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 2Abdul Haseeb
 
Functional techniques in Ruby
Functional techniques in RubyFunctional techniques in Ruby
Functional techniques in Rubyerockendude
 
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 cInnovative
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3Abdul Haseeb
 
Presentation on function
Presentation on functionPresentation on function
Presentation on functionAbu 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
 
Bakery Algorithm
Bakery Algorithm Bakery Algorithm
Bakery Algorithm thededar
 

Tendances (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
 

En vedette

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 alphabetMelina 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 organisasiMelina 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
 
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
 
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 DivisionFibonacci 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 CommandMelina 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
 

En vedette (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)
 

Similaire à Tugas algoritma fibonacci

Algoritmos sujei
Algoritmos sujeiAlgoritmos sujei
Algoritmos sujeigersonjack
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaanwalia Shaan
 
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 JavaPokequesthero
 
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.pdfanavmuthu
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simpleAteji Px
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2Ankit Gupta
 
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.pdfJayveeCultivo
 
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.pdfanonakitchen
 

Similaire à 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
 

Dernier

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Dernier (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

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