The answer is D Compress
I hope this helps
Answer:
5,10; 6,12; 7,14
Explanation:
We will demonstrate the iteration of the loop:
First iteration: Number = 7, Count = 5 at the beginning. We will check if Count <= Number? Since it is correct, prints 5,10. Increment the Count by 1.
Second iteration: Number = 7, Count = 6. We will check if Count <= Number? Since it is correct, prints 6,12. Increment the Count by 1.
Third iteration: Number = 7, Count = 7. We will check if Count <= Number? Since it is correct, prints 7,14. Increment the Count by 1.
Forth iteration: Number = 7, Count = 8. We will check if Count <= Number? Since it is not correct, the loop stops.
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.
Fish-eye because this is how you would see through a "fish eye" point of view in a rounded tank that is commonly used.
May I please have brainliest