My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.lineadecodigo.java.math;

/**
* @file PotenciasDelDos.java
* @version 1.0
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 14/enero/2009
* @url http://lineadecodigo.com/2009/01/16/potencias-del-dos-con-java/
* @description Listado de potencias del 2.
*/

public class PotenciasDelDos {

public static void main(String[] args) {

int iNumeroPotencias = 10;

System.out.println("Potencias del dos");

for (int x=0;x<=iNumeroPotencias;x++)
System.out.println("2 elevado a " + x + " igual a " + (int)Math.pow(2,x));



}

}

Change log

r78 by vcuervo on Jan 15, 2009   Diff
Potencias del 2 con Java
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 603 bytes, 27 lines
Powered by Google Project Hosting