0

Think quick

Make an algorythm that sums up the last 3 cyphers of a number, lets see who gets this right first.

19th Oct 2016, 12:54 PM
Teodor Teodor
Teodor Teodor - avatar
3 Réponses
+ 2
Cyphers?
19th Oct 2016, 1:20 PM
Zen
Zen - avatar
0
you mean digits? store in arrays and add last 3 cells. or simply mod 10 thrice and add....
19th Oct 2016, 1:59 PM
Pavan Kate
Pavan Kate - avatar
0
sum=(a%10)+(a%100-a%10)/10+(a%1000-a%100)/100
19th Oct 2016, 2:44 PM
marcram