compute and output the penalty on an unpaid Credit Card balance. Assume that interest rate on unpaid balances is 1.5% per month. ask the user for their credit card balance and monthly payment amount. Then output the new balance and the penalty amount to be added to the next month bill. #include using namespace std; int main() { const double INTEREST_RATE = 0.015; // ask the user for the credit card balance // ask the user for a payment amount //calculate balance as creditCardBalance - payment //determine if a penalty will be assessed for unpaid balance. //set the output precision to reflect dollar and cents cout << "The new credit card balance is: $" << value_here << endl; cout << "The penalty to be added to your next month bill is: $" << penalty_amount << endl; return 0; }

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 4PE: 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and...
icon
Related questions
Question

compute and output the penalty on an unpaid Credit Card balance. Assume that interest rate on unpaid balances is 1.5% per month. ask the user for their credit card balance and monthly payment amount. Then output the new balance and the penalty amount to be added to the next month bill.

#include <iostream>
using namespace std;

int main() {

const double INTEREST_RATE = 0.015;

// ask the user for the credit card balance

// ask the user for a payment amount

//calculate balance as creditCardBalance - payment

//determine if a penalty will be assessed for unpaid balance.
//set the output precision to reflect dollar and cents

cout << "The new credit card balance is: $" << value_here << endl;
cout << "The penalty to be added to your next month bill is: $" << penalty_amount << endl;

return 0;
}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage