Answer:
Explanation:
Since there are no line numbers in this question I will start counting from public class SelectionSort{ as line 1 and so on, as well as provide the code on that line.
The index of the smallest value is returned on line 8 where it says return min which shouldn't have any spaces and should be return minPosition;
The input array is given as an argument at the beginning of the function on line 2 where it says private static int positionMin (int] vals, int startPosition) {, as the variable vals.
This input array is also used as an argument on line 10 where it says Position; private static void swap(int] vals, int firstPosition, int secondPosition) and line 15 where it says vals[secondPosition] temp return public static void selSort(int| vals) {
Answer:
Keeping you hands on the homerow keys
Explanation:
Answer:
The formula for the given problem is given below:
= (1+B$12)×B13
Explanation:
Immediately you do one, then you can autofill the formula to the mentioned range B15:B17 and then to C14 to H17
When been done correctly, this is how the formula will look in those cells if you do it correctly.
Check the file attached below to see it.
Answer:
if(revenue.cents - expenses.cents < 0){
profit.dollars = revenue.dollars - expenses.dollars - 1;
profit.cents = 1 - revenue.cents - expenses.cents;
}
else{
profit.dollars = revenue.dollars - expenses.dollars;
profit.cents = revenue.cents - expenses.cents;
}
Explanation:
We know that profit is given as: revenue - expenses from the question.
From the given expression above;
if(revenue.cents - expenses.cents < 0)
then profit.dollar will be revenue.dollars - expenses.dollars - 1; the 1 is to be carry over to the cent part. And the profit.cent will be 1 - revenue.cents - expenses.cents;
else the profit.dollars and the profit.cent is computed directly without needing to carry over:
profit.dollars = revenue.dollars - expenses.dollars;
profit.cents = revenue.cents - expenses.cents;