Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
4Activity
×
0 of .
Results for:
No results containing your search query
P. 1
Serie Fibonacci(JAVA)

Serie Fibonacci(JAVA)

Ratings:

4.67

(3)
|Views: 6,732|Likes:

More info:

Published by: Paul Dremyn Gomez Chong on Mar 28, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, DOC, TXT or read online from Scribd
See More
See less

10/06/2010

pdf

text

original

 
/** Main.java** Created on 23 de abril de 2007, 17:06** To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose* Open. You can then make changes to the template in the Source Editor.*/ package serie;/**** @author Invitado*/ public class Main { /** Creates a new instance of Main */public Main() {} /*** @param args the command line arguments*/public static void main(String[] args) {int s1,s2,s,i,n;n=Integer.parseInt(args[0]);s1=0;s2=1;switch(n){case 1:{ System.out.print("Terminos de la serie:0\t");System.out.println("\n Con n="+n);break;} case 2:{ System.out.print("Terminos de la serie:0\t1");System.out.println("\n Con n="+n);break;} default:{System.out.print("Terminos de la serie:\n"+s1+"\t"+s2);i=2;while(i<n){s=s1+s2;s1=s2;s2=s;i=i+1;System.out.print("\t"+s);}

Activity (4)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Luis Andres R liked this
Phoenix Lo liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->