0

How do make output 10-20-30-40-50 in java using long after user input? Thanks

i would like a long number to be broken up with - but without using string

3rd Aug 2017, 9:13 PM
D_Stark
D_Stark - avatar
3 Réponses
+ 3
long input = scannerName.nextLong(); // No strings used As for that output, you can just use a for loop and increment the variable by 10 each itteration.
4th Aug 2017, 2:18 AM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Maybe doing an increment per 10
4th Aug 2017, 12:11 AM
Daniel
Daniel - avatar
0
thanks faith ill have ago at this
4th Aug 2017, 8:36 AM
D_Stark
D_Stark - avatar