0
public class quersumme {

public static int quersum(int a) {

for(int summe=0;) {while (a>0) {summe=summe+a%10;}
}

return a;
}
public static void main(String[] args) {
int Wert=123;
System.out.print(quersum(Wert));
}
}

Program has issues with the for loop. It shows an error in ";". Thanks for helping.

  • What language is this? Look like Java? – Pod May 12 '22 at 09:45
  • Ask yourself what the point of this for loop is. I think this question requires a little more effort debugging and researching. What have you tried so far? SE is not a code debugging service, especially for code that probably doesn't even compile. –  May 12 '22 at 18:46
  • @clvrmnky is it even in a compilable language? C#? – Jeter-work May 13 '22 at 20:05
  • @Jeter-work well, that would be my point. I don't even care what language it is in, but the OP ought to, and the OP ought to know if this snippet runs or not and what it does or does not do. –  May 17 '22 at 13:48

0 Answers0