C programming windows application console Create a program t
C++ programming windows application console!!!
Create a program that calculates how much a person would make for a set number of days on the premise that the first day they would be paid $0.01. the second day $0.02, the third day $0.04, the fourth day $0.08 etc. Pay should double each day until the number of days jittered has been calculated The program should display the daily pay as well as the total earned over the days worked.Solution
#include <iostream>
#include <iomanip>
#include<string>
using namespace std;
int main() {
//declare variables
int days;
double pay = 0.01;
double sum = 0;
cout << \"Enter number of days : \";
cin >> days;
int i = 1;
cout << \"Day\\tPay\" << endl;
for(i=1;i<=days;i++)
{
cout << i << \"\\t\" << pay << endl;
sum = sum+pay;
pay *= 2;
}
cout << \"Total is : \" << sum << endl;
return 0;
}//End of Main function
