Answer:
import java.util.Scanner;
public class num8 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter month's budget");
double monthBudget = in.nextDouble();
double totalExpenses = 0.0;
double n;
do{
System.out.println("Enter expenses Enter zero to stop");
n = in.nextDouble();
totalExpenses += n;
}while(n>0);
System.out.println("Total expenses is "+totalExpenses);
System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));
}
}
Explanation:
- Using Java programming language
- Prompt user for month's budget
- Use Scanner class to receive and store the amount entered in a variable
- Use a do while loop to continuously request user to enter amount of expenses
- Use a variable totalExpenses to add up all the expenses inside the do while loop
- Terminate the loop when user enters 0 as amount.
- Subtract totalExpenses from monthBudget and display the difference as the amount over the budget
#This is a way without a loop
friends = list(map(str,input("Enter Names: ").split()))
print(sorted(friends))
#This is a way with a loop (for&&while)
friends = list(map(str,input("Enter Names: ").split()))
cool = True
while cool:
cool = False
for i in range(len(friends)-1):
if friends[i] > friends[i+1]:
coo = friends[i]
friends[i] = friends[i+1]
friends[i+1] = coo
cool = True
print(friends)
Answer:
OneDrive is a storage location on your personal computer.
Explanation:
Its gives u extra storage as well as helps u to take backup for all ur files that are important to u
Hope this helps...
Pls mark my ans as brainliest
If u mark my ans as brainliest u will get 3 extra points
Answer:
A. Multi-field attributes
B. A ternary relationship
C. A unary relationship