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.
This site is only for education related questions. You should only answer or ask questions. That's what we are here for. Whoever is reading this answer, please spread it to stop people from zooming, hurting others, or just posting non-related to education questions. Thank you.
Answer:
This is a heading
Explanation:
This is a paragraph does not exist. You would simply use p for paragraph. Therefore This is a heading is the correct answer.
Access hundreds of professional development resources for museum professionals. Museum professionals can benefit at any career stage from student to retiree. Student Membership. Industry Membership. Established Since 1906. Museum Memebership. 501(c)3 Nonprofit Org.
Answer:
TCP
Explanation:
Transmission control protocol ensures packets loss and performs retransmission
TCP works with Internet Protocol (IP)
TCP/IP defines how computers send data packets to each other.
TCP allows transmission of information in both the direction.
Bit rate :defines the rate at which bits are transferred from one place to another