![khloeallnn](/avatars/19633.jpg)
khloeallnn
26.07.2021 •
Mathematics
SEE QUESTION IN IMAGE
Solved
Show answers
More tips
- H Health and Medicine Why Do Humans Have One Heart?...
- S Style and Beauty How to knit a hooded cowl?...
- H Horoscopes, Magic, Divination How to Cast a Love Spell on a Guy? Guide for Guys...
- S Style and Beauty Tricks and Tips: How to Get Rid of Freckles...
- H Health and Medicine What is Autism? Understanding the Basics of This Neurodevelopmental Disorder...
- F Family and Home How to Properly Use a Water Level?...
- D Dating, Love, Relationships 10 Useful Tips on How to Survive a Breakup?...
- F Food and Cooking Apple Cider Vinegar: The Ultimate Health and Beauty Solution...
- C Computers and Internet Е-head: How it Simplifies Life for Users?...
Answers on questions: Mathematics
- M Mathematics If a circumference of a circle is 22cm.find it diameter take pie 22/7....
- M Mathematics B.1-2x+ 5 = 4x - 3i need on my question pleasing things...
- M Mathematics The opposite sides of a parallelogram are always sometimes or never congruent...
- M Mathematics Triangle pqr is similar to triangle tuv. the perimeter of triangle pqr is 60 inches. what is the perimeter of triangle tuv?...
- M Mathematics Pls what is the answer to the problem...
- M Mathematics Solve the equation for x 3x-1/4 = -5/11...
- M Mathematics Solve the equation for x a. 6-5(2x-3) = 4x+7 b. 3x/4 +2 = 4x-1...
- M Mathematics Which inequality represents this sentence? eight times three is less than or equal to ten times five. 8 • 3 ≥ 10 • 5 8 • 3 10 • 5 8 • 3 10 • 5 8 • 3 ≤ 10 • 5...
- M Mathematics For which distribution is the median equal to the mean? skewed left uniform skewed right normal...
- M Mathematics Solve: five more than a number is the same as twice the number. find the number....
Ответ:
...
Step-by-step explanation:
Ответ:
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));
}
}