Answer the question
In order to leave comments, you need to log in
How to divide by tenths if they hit?
Hello, please tell me how to multiply and divide if the number comes across with tenths?
String res = String.valueOf(input1 * porci2 / 100);
Answer the question
In order to leave comments, you need to log in
Hello!
I recommend that you seriously study the basics of programming and, in particular, programming in Java. Understand concepts such as dynamic and static typing.
Java is a statically typed language. This means that the type of a variable is declared at the time it is declared. I also recommend reading about such concepts. as explicit and implicit type casting.
Based on the above, the following is not clear:
and if a number with tenths or hundredths comes across in porci2, then the application crashes ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question