Answer:
import java.util.Scanner;
class Main {
public static int calcSeries(int n) {
int sum = 0;
for(int i=10; i>=n; i--) {
sum += i;
}
return sum;
}
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
int n = 0;
do {
System.out.print("Enter n: ");
n = reader.nextInt();
if (n >= 10) {
System.out.println("Please enter a value lower than 10.");
}
} while (n >= 10);
reader.close();
System.out.printf("sum: %d\n", calcSeries(n));
}
}
Answer:
The answer is "option B".
Explanation:
In the given code, four double variable "len1, len2, len3, and total" is declared, in which the first three variables accept some value, and in the total variable, we add those variable. In the next step, an integer variable minLength is defined, which converts the decimal value to an integer and adds the value that is "0.5". In this section, the code uses as an intended purpose but only if the total of 3 lengths is equivalent to or larger then 0.5, and wrong choices can be described as follows:
- In option A, It accepts the negative value, that's why it is wrong.
- Option C, Option D, and Option E all were wrong because the code segment is work as intended.
A. processor / CPU
b. video card / GPU
Answer:
D because the other are mire of styling your paragraphs and your looking at how to set and format your paragraphs