Question

In: Computer Science

An employee applied for a job in a company and agreed to be paid as follows:...

An employee applied for a job in a company and agreed to be paid as follows: He will recieve P1 on the 1st day, P2 on the 2nd day, P4 on the 3rd day, P8 on the 4th, and so on. ( meaning his daily pay doubles each day)> How much will he recieve the at the end of 30 days?

use for loop or looping

Solutions

Expert Solution

Thanks for the question, here is a simple program in C++ that calculates the pay the person will receive on 30th day. We are assuming the person starts with $1 on the first day.

Using for loop we have evaluated his 30th pay. Here is the screenshot of the out.

======================================================================================

#include<iostream>
using namespace std;

int main(){
  
  
int pay=1;
cout<<"Day - "<<1<<" - Pay Amount: $"<<pay<<endl;
for(int day=2; day<=30; day++){
   
    pay = 2*pay; // double the salary of the previous day for the current day
    cout<<"Day - "<<day<<" - Pay Amount: $"<<pay<<endl;
}
  
}


Related Solutions

An Indonesian foreign firm agreed to sell and deliver goods to a Malaysian company that paid...
An Indonesian foreign firm agreed to sell and deliver goods to a Malaysian company that paid a considerable sum of money in advance. However, the contract was frustrated because of the 5.0 magnitude of an earthquake near Bima in West Nusa Tenggara. The Malaysian company claimed the right to recover the deposit they paid prior to the frustrating event. Advise the Malaysian company.
6. A student has applied for a job at Company X and Company Y. The probability...
6. A student has applied for a job at Company X and Company Y. The probability of getting the job at "X" is 0.45, and the probability of getting the job at "Y" is 0.20. Assuming that the job offers are independent of each other, what is the probability that: A. The student gets an offer from both companies? B. The student will get at least one offer? C. The student will not receive an offer from either company?
How much manufacturing overhead was applied to Job P and how much was applied to Job Q?
Sweeten Company had no jobs in progress at the beginning of March and no beginning inventories. The company has two manufacturing departments--Molding and Fabrication. It started, completed, and sold only two jobs during March—Job P and Job Q. The following additional information is available for the company as a whole and for Jobs P and Q (all data and questions relate to the month of March): Molding Fabrication Total Estimated total machine-hours used 2,500 1,500 4,000 Estimated total fixed manufacturing...
You have just applied for a job contract at LSP Company. This company will pay you...
You have just applied for a job contract at LSP Company. This company will pay you $75 at the end of the first year, $225 at the end of the second year, and $300 at the end of the fourth year. Currently you have a saving account in the bank that pays you a rate of 8% compounded annually. What is the future value of such contract at the end of the fourth year? *
Suppose that the time between two absences of a supermarket employee in a company follows an...
Suppose that the time between two absences of a supermarket employee in a company follows an exponential distribution. Based on the past data on number of supermarket employees absent in a particular month, it has been observed that on an average 5 supermarket employees tend to be absent in any given month. What is the probability that the time between two absences for a particular supermarket employee is: Less than 2 weeks Between 2 weeks and 4 weeks More than...
The company uses a job-order costing system in which overhead is applied to jobs on the...
The company uses a job-order costing system in which overhead is applied to jobs on the basis of direct labor cost. Its predetermined overhead rate is based on a cost formula that estimated $94,500 of manufacturing overhead for an estimated activity level of $45,000 direct labor dollars. At the beginning of the year, the inventory balances were as follows: Raw materials $ 10,800 Work in process $ 4,400 Finished goods $ 8,900 During the year, the following transactions were completed:...
For a Janitorial Company: Based on the job requirement every employee should contribute equally to their...
For a Janitorial Company: Based on the job requirement every employee should contribute equally to their work; having said that, senior employees should be entitled to a higher salary than their junior employees because they invested their whole life in the company. However, since the job requires a lot of physical work and performance we agree to let staff be reduced based on their performances and evaluation.   Instructions: Add more on why performance evaluation and productivity is more important than...
1. Company X has an employee who is paid weekly. For Company X the FUTA tax...
1. Company X has an employee who is paid weekly. For Company X the FUTA tax rate is 6%. The limit for FUTA is $7000 of employee annual earning subject to the applicable tax. The employee earns $1000 for the week and has cumulative earnings year to date through the previous week of $6500. How much is deducted from the employee’s weekly paycheck for FUTA? A. -60- B. 30 C. 600 D. 300 E. None of the above 2. For...
Tyler Tooling Company uses a job order cost system with overhead applied to products on the...
Tyler Tooling Company uses a job order cost system with overhead applied to products on the basis of machine hours. For the upcoming year, the company estimated its total manufacturing overhead cost at $225,720 and total machine hours at 62,700. During the first month of operations, the company worked on three jobs and recorded the following actual direct materials cost, direct labor cost, and machine hours for each job:     Job 101 Job 102 Job 103 Total Direct materials used $...
ABC Company uses a job order cost system with overhead applied to products on the basis...
ABC Company uses a job order cost system with overhead applied to products on the basis of machine hours. For the upcoming year, the company estimated its total manufacturing overhead cost at $259,530 and total machine hours at 63,300. During the first month of operations, the company worked on three jobs and recorded the following actual direct materials cost, direct labor cost, and machine hours for each job:     Job 101 Job 102 Job 103 Total Direct materials used $ 11,800...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT