Questions tagged as 'double'

1
answer

Can not be implicitly converted from double to int. There is already an explicit conversion

error en la linea    edges [(i)] = Math.Sqrt (aux11 + aux12 + aux13);        public static void distance (int x, int n)              { for ( int i = 0; i <= n - 1; i++) { noditos[i] = i; if (i ==...
asked by 27.09.2018 / 14:57
1
answer

problem with decimal in java

I have a product of two numbers double resultado = XN1 * XN; but that result would like to add a 0.resultado, I do with this method String convertirdecimal(String cad) { String cad2 = "0." + cad; return cad2; } When that happen...
asked by 22.05.2017 / 16:58
0
answers

You can not implicitly convert the type "double" to "double [] using Math.Pow

Help I was using this formula: A * (Math.Pow(Xo, Potencia)) + B * (Math.Pow(Xo, Potencia2)) - C where Xo is entered by keyboard and converted with: Xo = Convert.ToDouble(Console.ReadLine()); And in the formula the error...
asked by 26.07.2018 / 04:50
1
answer

getdoubleValuer () returns 0.0 when the number is negative

I have a datasnapshot of a firebase node and its data is all right as I need it, the problem I have when I try to take the messenger.getLng_dir_ini () since it always returns 0.0 and its cosola value from the datasnapshot .getValue (). toString...
asked by 15.07.2018 / 18:10
1
answer

error when inserting a double value in a database

I try to make an insert of a double value into a database (MySQL) and it shows me the error: java.sql.SQLException: '∞' is not valid numeric or approximate numeric value Connection conexion = AdminConexion.getInstancia().obtenerConexion();...
asked by 17.06.2018 / 03:34
1
answer

Limit the number of decimals

If I want to enter the price $ 6.00 How do I limit the number of decimals? Using: dts.setPrecio(Double.parseDouble(txtprecioExamen.getText()));     
asked by 05.05.2018 / 11:55
1
answer

Can you help me with the method to make the array eliminate the repeated numbers? [closed]

public static double[] exercici2(double[] a) { for (int i = 0; i < a.length; i++) { double num = a[i]; for (int j = i+1; j < a.length; j++) { if (num != a[j]) { a[i] =a[j]; }...
asked by 11.04.2018 / 17:46