Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

My brain has just switched off on me... have an easy program towrite for a C++ c

ID: 3610727 • Letter: M

Question

My brain has just switched off on me... have an easy program towrite for a C++ class that involves a for loop with a runningtotal, but my brain has shut down on what needs to be put into thefor loop to complete the program.

The program needs to calculate how much a person would earn over aperiod of time (days) if his salary is one penny the first day, twothe second, four the third, and continues to double each day.Program asks how many days for work, displays a table showing howmuch he earned each day, and how much total pay at the end of theperiod. Output needs to be displayed in a dollar amount, not numberof pennies. There must be input validation to not accept a numberless than one for days worked.

Here's where i'm at so far..

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    int days;
    double total = 0.0;
    cout << "How many days are you working?";
    cin >> days;
    while (days < 1)
    {
    cout << "Please enter a valid number ofdays to work. ";
    cin >> days;
    }
    for (int count = 1;count <= days;count++)
    {
    }
return 0;

Explanation / Answer

#include #include using namespace std; int main() {     int days;     double total = 0.0;    double everyday=0.01;     cout > days;    cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote