
importar javagently a netbeans 8
Publicado por Jose Ramon (3 intervenciones) el 02/07/2014 23:33:51

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
28
import java.io.*;
import javagently.*; // packget javagently does not exist
public class Suma {
public static void main(String[]args)throws IOException {
int contador;
double total=0;
double numero;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Sumando Números");
System.out.println("¿Cuantos numero quiere sumar :?");
contador = Text.readInt(in); // el Text tambien da error ya que pertenece a javagently
for (int i=0; i<= contador; i++) {
System.out.print(i+"> ");
numero= Text.readDouble(in);
total += numero;
}
System.out.println("Ya ha introducido "+contador +"numeros");
}
}
Gracias anticipadas por este foro.
Joserra
Valora esta pregunta


0