0
I’m trying to convert weight into money, but every time my answer is zero and I calculated here and nn should give zero kkkkk someone can help me Obs: the 5 is the price per kilo (This job will make me pass the series give me a help pf kkk)
private void convertButtonActionPerformed(java.awt.event.ActionEvent evt){
double pesagem = Double.parseDouble(peso.getText());
double Result = ((5/1000)*pesagem);
textresult.setText("R$ "+Result);
}
Peso in cash? What is this conversion? Edit the question there, it is quite difficult to understand.
– user28595
The program is for a Gelateria where the employee type the weight of the ice cream and the software calculate and turns into money according to the price per kilo
– Felipe Moreno Borges
Then edit the question and give more details about what you are doing (as you did in the comments), otherwise it is difficult to understand the problem.
– user28595
Has any response helped solve the problem and can address similar questions from other users? If so, make sure to mark the answer as accepted. To do this just click on the left side of it (below the indicator of up and down votes).
– Sorack