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
Answer:
Given the number of platters =5
A. Hence, the number of recording surface =10
B. number of read-write heads =10
C. Number of arms holding the read-write heads = 10
Explanation:
We know that number of recording surface = 2 *( number of platters)
= 2*5=10
And the number of read-write heads = number of recording surface= 10
Also, number of arms holding the read-write head = one for each read-write head= 10
And hence, the above answer.