هلا اختي..
هذا حل السوال الاول طبعا الحل ممكن يختلف بعض الشي اذا في شي انا استخدمته وانتم باقي ما درستوه..
كود:
public static void main(String[] args) {
int Digits = 0;
int tempDig = 0;
int i;
int count = 0;
Scanner sc = new Scanner(System.in);
///////////
System.out.println("Please enter a number between 0 and 1000: ");
Digits = sc.nextInt();
tempDig = Digits;
if (Digits < 0 || Digits > 1000) {
System.out.println("The number is not between 0 and 1000.");
} else {
for (i = 0; i < 4; i++) {
count = count + tempDig % 10;
tempDig = tempDig / 10;
}
System.out.println("The sum of Digit " + Digits + " is " + count);
}