Is there an easy way to perform the following calculation?
String value = "921030022447967916"
a) Each alternating character is multiplied by 2 or 1
(i.e. 9*2, 2*1, 1*2...)
b) All digits are then summed:
9*2=18 or 1+8 + 2*1 or 2 + 1*2 or 2...)
I am new to this website and any help with...
I am attempting to convert a Java application to an Applet. I have dialog boxes (via JOptionPane.showInputDialog) that get input from the user. The dialog boxes look fine in the Java app, but in the Applet they get cut off (i.e. the OK and CANCEL buttons are partly chopped and also some of my...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.