Answer:
import java.util.Scanner;
public class num2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int total = 0;
for(int i=0; i<5; i++){
System.out.println("Enter next Int: ");
total = total+in.nextInt();
}
System.out.println(total);
}
}
Explanation:
In the code above written in Java programming language, the for loop statement for(int i=0; i<5; i++) ensures that the loop goes from 0-4 a total of five times.
At each iteration it requests a user to enter an int. The number entered is stored in the variable total which is initially assigned 0.
When the loop finishes execution, total is printed out
Well for must cases it is the Ram of the system and the processor I will show you how you can get rid of slow processing
- Run the task manager then try to stop some running programs
- the antivirus sometimes slows the computer due to the processing power it takes.
- I would recommend that all program should be closed from the task manager and close some running apps in the system settings go to start up and then close it now you are good to go.