I am missing loop.
i need help
package com.codegym.task.task01.task0132;
/*
Sum of the digits of a three-digit number
*/
public class Solution {
public static void main(String[] args) {
System.out.println(sumDigitsInNumber(546));
}
public static int sumDigitsInNumber(int number) {
int i = 0,s;
while(number>=0)
{
s = 10 % number;
i = i + s ;
number = number / 10;
// return i; i
}
return i;//write your code here
}
}