0
Write a program to find the sum of natural numbers from 1 to 10.
BU JAVA SCANNER CLASS
1 Antwort
+ 1
int sum = 0;
for(int x=1; x<=10; x++)
sum += x;
System.out.println(sum);
I don't understand where Scanner (input) is needed in your question. :|