1,hi i need to create a program that will repeat the following 14 times.it needs to provide keyboard input that takes in hours worked in a day.after the 14 time it needs to show the hours worked.
2,the rate of pay is 6 pounds 50 pence. it needs to provide the gross pay on screen for those two weeks.
3,it needs to provide their gross pay for one year assuming they get the same every two weeks.
4,it needs to provide the yearly net pay taking off 20% tax & 5% national insurance
if anyone can help me out with this i would be very gratefull, i am a total beginner and this is for the course i am on and am really struggling#cheers john

#include "stdafx.h"
#include "iostream"
using namespace std;

int main(void)

	float fTotal=0;
	float fHoursworked=0;
	float fPay=6.5;
	float cYear=26;
		cout <<"please enter the your hours worked today\n";
	for (int idays = 0);idays;<14;idays;+=1)
cin >>  fHoursworked;
fTotal += fHoursworked;

	cout <<"the total number of hours worked is"<<fTotal<<"\n";
	fTotal = fTotal*fPay;
		cout <<"the total number of hours worked is"<<fTotal<<"\n";
	fTotal= fTotal* cYear;
		cout<<"the total number of hours worked is"<<cYear<<"\n";
	return 0;

this is where i'm at lots of errors can't work it out

8 Years
Discussion Span
Last Post by Sci@phy

Work through the error messages one at a time. The first error is normally what's wrong. Correct that error then recompile -- you will get a lot fewer error messages that way.

For example: line #2 of the code you posted is probably wrong. System header files are enclosed in < and > brackets, not quotes. #include <iostream> line 12: you have an extraneous ; just before the += operator

line 13: you used the wrong brace -- should be { instead of }, and your program is missing the matching }

for (int idays = 0);idays;<14;idays +=1)
    cin >>  fHoursworked;
    fTotal += fHoursworked;

Several syntax mistakes:
1. Missing opening bracket after main()!
2. Missing opening bracket after for (instead you have closing bracket on line 13.)!
3. Missing closing for-bracket.
4. Missing closing main() bracket!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.