I think the answer is b
hope this helps :)
Answer:
The answer is D. In order to make an advertisement, the photo or photos have to be clear and easy to see. They also have to stay clear when they are enlarged
Explanation:
Answer:
The output of code will be 10
Explanation:
We need to find output of following code:
C = 1
Sum = 0
while (c less than 10):
C = c + 3
sum = sum + c
print (sum)
Solution:
We will check the condition of while loop, if the condition is true, then the statements inside the loop will be executed. Since brackets are not available so, only one statement is linked with while loop.
First while loop will be executed c < 10 (1<10) the condition becomes true, and statement c=c+3 will be executed ( 4=1+3) and then loop condition will be checked (4<10) the condition becomes true, and statement c=c+3 will be executed ( 7=4+3) and then loop condition will be checked (7<10) the condition becomes true and statement c=c+3 will be executed ( 10=7+3) and then loop condition will be checked (10<10) the condition becomes false, so we will come outside loop body and execute: sum=sum+c (10=0+10) and print sum i. e 10
So, The output of code will be 10
Answer:
Option a. int max = aList.get(0); for (int count = 1; count < aList.size(); count++) { if (aList.get(count) > max) { max = aList.get(count); } }
is the correct code snippet.
Explanation:
Following is given the explanation for the code snippet to find largest value in an integer array list aList.
- From the array list aList, very first element having index 0 will be stored in the variable max (having data type int).
- By using for starting from count =1 to count = size of array (aList), we will compare each element of the array with first element of the array.
- If any of the checked element get greater from the first element, it gets replaced in the variable max and the count is increased by 1 so that the next element may be checked.
- When the loop will end, the variable max will have the greatest value from the array aList.
i hope it will help you!