Questions tagged as 'double'

1
answer

How to print a double with 4 houses after the point in C #

static void Main(string[] args) { double area, raio , pi; pi = 3.14159; raio = Convert.ToDouble(Console.ReadLine()); area = pi * Math.Pow(raio,2); Console.WriteLine("A={0}\n",area.ToString("N0")); } The input value i...
asked by 24.03.2018 / 18:18
2
answers

How not to lose decimals when doing "longProperty1.divide (longProperty2)"?

What I want to do is very simple, I just do not know how to "do it right" in JavaFX: I have two LongProperty ( num1 e num2 ) and a DoubleProperty ( resultado ) , where this DoubleProperty resultado must contain...
asked by 16.09.2017 / 23:39
1
answer

Convert String to Double while maintaining content

I need in Java to convert a String that has a binary value (Ex: "0111010") to a double . I tested: String teste = "101010101"; double number = Double.parseDouble(teste); System.out.println("The number is: " + number); But the o...
asked by 04.05.2016 / 05:47
1
answer

Double Click Android

I'm developing an application that has a list in RecyclerView and the idea is for the person to choose one or more products from this list and change color to show that it is selected, but in case the person chooses the wrong one, a doubl...
asked by 18.09.2017 / 21:55
1
answer

How do I put the value of a variable inside a textbox?

People, I have a boring problem. I wanted to put the text I took from one textbox and put in another that is set to readonly. I wanted it to work as a label. I tried textchange gave error. private void btncalcular_Click(object sender, EventAr...
asked by 12.08.2017 / 07:11
1
answer

Why do these two identical codes, one in C ++ and another and Java, give different results? [closed]

I'm trying to resolve an issue in the Online Judge URI in Java however I'm remarking 5 % error, and from what I've studied is being caused by the fact that the precision of the variables in C ++ and Java is different. I've tried everything to...
asked by 05.10.2018 / 06:30
1
answer

Convert monetary values "R $" to double type

Hello, I have several CSV files, in which some monetary values have been stored in real columns: "R $ 1,986.00". However, I want to pass all CSVs to SQLite and then parse the data in Power BI. So, instead of exporting the CSV data to SQLite in t...
asked by 28.11.2017 / 22:17
3
answers

How to convert text field with mask to double

I have a field in html of type text that has a currency mask. I have to save this value to a field of type double in the database, but I'm having trouble converting, where the value that would be after the comma is suppressed after...
asked by 02.06.2017 / 20:23
2
answers

Problems with the result of a sum between double numbers [duplicate]

I want to do the following calculation: 615.6555 + 566 I expected this result: 1181.6555 However, this is returning this: 1181.6554999999998 How do I solve this problem?     
asked by 22.01.2018 / 07:07
1
answer

Change number of digits after the comma depending on the situation [duplicate]

I know I can get a digit bound after the comma with %.2f to float and %.2lf to double . How can I change this limit depending on the occasion? For example: Get a two-digit limit with float that would...
asked by 09.07.2017 / 03:54