Ciclos2 - import java.io.*; import java.util.*; public...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: import java.io.*; import java.util.*; public class Ciclos2{ public static double factorial(int i){ double factorial = 1; for(int j=1; j<=i; j++){ factorial = factorial * j; } return factorial; } public static double numeroE(int n){ double acum =1+n; for (int i =2; i<=100; i++){ acum = acum + (Math.pow(n, i)/factorial(i)); } return acum; } public static void main(String args){ int a = 10; while(a != 0) a--; System.out.println(" Valor final de la variable a: "+a); int x = 0; int y = 56742;...
View Full Document

This note was uploaded on 10/29/2009 for the course ITC TC-1002 taught by Professor X during the Spring '09 term at ITESM.

Page1 / 2

Ciclos2 - import java.io.*; import java.util.*; public...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online