![chrisraptorofficial](/avatars/37395.jpg)
chrisraptorofficial
25.09.2019 •
Social Studies
What is the major body of water between asia and north america?
Solved
Show answers
More tips
- C Computers and Internet How to Teach Older Generations to Work with Computers?...
- L Leisure and Entertainment Unlocking the Secrets of Fast and Effective Tectonic Learning...
- S Style and Beauty How to Choose the Perfect Hair Color?...
- C Computers and Internet Best iPad Games: Our Opinion...
- A Animals and plants Man s Best Friend: Which Dog Breed Is the Most Friendly?...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- G Goods and services How to Choose the Right High Chair for Your Baby?...
- S Style and Beauty Learn how to tie a keffiyeh on your head like a pro...
- S Style and Beauty How to braid friendship bracelets?...
Answers on questions: Social Studies
- S Social Studies What do most elections for local, state, and federal offices have in common? a. they are winner-takes-all elections. b. they are administered by the federal government....
- S Social Studies Which of the following documents was responsible for limiting the power of king john in 1215? a. the magna carta b. the english bill of rights c. the mayflower compact...
- S Social Studies What s the area of a triangle with the sides of 4.5yd, 6 yd and 7.5 yd...
- S Social Studies Explain airside security for celabraty...
- S Social Studies Why is it important women are provided with equal rights and opportunities?...
- S Social Studies 1.3 Provide and explain THREE types of goals that a person can set for themselves, write an example for each type of goal....
- S Social Studies Which of the following is inside of the Roman Empire? Black Sea Caspian Sea Aegean Sea Red Sea...
- S Social Studies Who founded the Mauryan dynasty?...
- B Biology What is the function of the cell membrane? a) to give shape to the cell b) to increase the number of cells c) to control what enters and leaves the cell eliminate...
- B Biology Which method is a way of obtaining natural gas? (apex)...
Ответ:
import java.util.*;
import java.text.*;
class CreditCardBill
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(Locale.US);
System.out.println("CS Card International Statement");
System.out.println("");
System.out.print("Previous Balance: $");
double prevBalance = sc.nextDouble();
System.out.print("Additional Charges: $");
double addCharges = sc.nextDouble();
double interest;
if(prevBalance == 0)
interest = 0;
else
interest = (prevBalance + addCharges) * 0.02;
System.out.println("Interest: "+defaultFormat.format(interest));
double newBalance = prevBalance + addCharges + interest;
System.out.println("New Balance: "+defaultFormat.format(newBalance));
double minPayment;
if(newBalance < 50)
minPayment = newBalance;
else if(newBalance <= 300)
minPayment = 50.00;
else
minPayment = newBalance * 0.2;
System.out.println("Minimum Payment: "+defaultFormat.format(minPayment));
}
}