Answer:
import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner scan = new Scanner();
double budget=0, num=0, total=0;
System.out.println("Your budget for the month? ");
budget=scan.nextDouble();
System.out.println("enter all expense, and after that type -9999 to quit: ");
while(num != -9999)
{
total+=num;
num=scan.nextDouble();
}
if(total<=budget)
{
System.out.println("under budget by ");
System.out.println(budget-total);
}
else
{
System.out.println("over budget by ");
System.out.println(total-budget);
}
}
}
Explanation:
- Take the budget as an input from user and store it to the budget variable.
- Loop until user has entered all his expenses and keep on adding them to the total variable.
- Check If the total is less than or equal to budget or otherwise, and then print the relevant message accordingly.
Answer:
63 columns
Explanation:
In Microsoft Word you can insert a table with up to 63 columns, that is the limit to the number of columns allowed in a Word document.
<em>brainliest</em><em>? </em><em>plz! </em>
ANSWER:
B.
Transforming the data might help Mary notice a different pattern that makes a bigger impact on bus routes than regions of the City.
EXPLANATION:
Mary can check if there are other things or factors that might influence where the bus routes need to be prioritized. For example if the students' age is considered for the bus routes instead of regions. She can achieve this by
By Re-sorting or Transforming the data.
That is to say she will be able to find out if it is only region or if there are different patterns that makes bigger impacts on bus routes, by transforming the data.
I would do top to down approach start from the top and work your way down to the bottom.
Answer:
Explanation:
The following code is written in Python and is a recursive function as requested that uses the current value of p (which is count in this instance) and raises 2 to the power of p. If the result is greater than or equal to the value of n then it returns the value of p (count) otherwise it raises it by 1 and calls the function again.
def next_pow2(n, count = 0):
if (2**count) < n:
count += 1
return next_pow2(n, count)
else:
return count