ىب ىب لانو انا حطىت السم بعد ادخال الرقم لازم السم اول بعدىن ادخال الرقم
كود:
Scanner keypaord = new Scanner(System.in);
int n , sum=0;
System.out.println("what n ");
n= keypaord.nextInt();
while (n!=0){
sum+=n;
System.out.println("what n ");
n= keypaord.nextInt();
}
System.out.println("sum"+sum);
}
}