#include<iostream>
using namespace std;
int main()
{
const float SUNDAY = 200;
float OTHER = 100;
char whichDay;
float totalAmount = 0;
int nrSundays = 0;
cout << "Enter first Day : '2' for
Sunday '1' for other days" << '\n';
cin >> whichDay;
while(whichDay != 'x'){
if(whichDay ==
'1'){
totalAmount += OTHER;
}else{
totalAmount += SUNDAY;
nrSundays ++;
}
cout << "Enter the
next Day : '2' for Sunday '1' for other days" << '\n';
cin >>
whichDay;
}
cout << "Total Salary : " <<
totalAmount << endl;
cout << "Number of Sundays Worked : "
<< nrSundays << endl;
}
test run :
If you want any changes, please tell me in the comments
QUESTION 2 10 marks A construction company pays its temporary workers R100 per day if they...
QUESTION 2 10 marks A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character 'l'is entered if the day is Monday to Saturday and 2' if it is a...
QUESTION 2 10 marks A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character 'l' is entered if the day is Monday to Saturday and '2' if it is...
QUESTION 2 10 marks A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character '1' is entered if the day is Monday to Saturday and '2' if it is...
A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character 'l' is entered if the day is Monday to Saturday and '2' if it is a Sunday. A total...
Wadow Help COS1511 2012 2. COS1511 Nov 2012 semester 1 past pap... 2012_2017-sem2... COS1511 201 3 2 Solutions to exeras.. COS1511.PDF 9 / 12 100% QUESTION 2 10 marks A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to...
A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character 'l' is entered if the day is Monday to Saturday and 2’ if it is a Sunday. A total...
SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7...
Actions that damage a company and its employees should be stamped out, everyone would agree. But should the people responsible be stamped out, too? HBR CASE STUDY The Reign of Zero Tolerance by Ben Gerson "Mr. Pemberton?" manager. The guards had radioed her that the "Yes, that's me," Simon replied distractedly, his back turned. target wasn't putting up much resistance. "Your personal belongings will be messen The two burly gentlemen who had suddenly gered to your home later today," Sallie...