Answer:
public class num8 {
public static void main(String[] args) {
int lo =0;
int hi =10;
int result =0;
int i=0;
while(i>=lo && i<=hi){
result = result+i;
i++;
}
System.out.println(result);
}
}
Step-by-step explanation:
In the above code written in Java, the variables lo and hi have been declared and assigned the values of 0 and 10 respectively
The variable i is implemented as a counter for the control of the loop
The code finds the sum of numbers between lo (0) and hi (10) which evaluates to 55
In the while condition while(i>=lo && i<=hi) the counter i is incremented at every iteration by 1