SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 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
 

Similar a 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
 

Último

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
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
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
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
 
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
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(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
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(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
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(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
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 

Último (20)

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
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...
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
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...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
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
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(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...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park 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...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.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...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 

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