Nearly done

const int HOUR_MULTIPLIER = 3600;
const int MIN_MULTIPLIER = 60;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
//declaring all variables in the program
int Inputs();
int calculations();
}[
int Inputs(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
Serial.println("please enter the time taken");
Serial.println("swimming hours, minutes and seconds. Enter the same for bike and run");
while (!Serial.available()) {};
total_secs [0] = Serial.parseInt() * HOUR_MULTIPLIER; //converting hours to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt() * MIN_MULTIPLIER; // converting minutes to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt();
while (!Serial.available()) {};
total_secs [1] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs[1] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [1] += Serial.parseInt();

while (!Serial.available()) {};
total_secs [2] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt();
total_secs [3] = total_secs [0] + total_secs [1] + total_secs [2];
}

int calculations(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
for (int index = 0; index < 4; index++) {

Serial.println(names[index]);
Serial.print(" hours ");
Serial.print(total_secs[index] / HOUR_MULTIPLIER);
total_secs[index] = total_secs[index] % HOUR_MULTIPLIER;
Serial.print( " minutes " );
Serial.print(total_secs[index] / MIN_MULTIPLIER);
total_secs[index] = total_secs[index] % MIN_MULTIPLIER;
Serial.print(" seconds ");
Serial.println(total_secs[index]);
}
}
void loop() {
// put your main code here, to run repeatedly:
}

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason or random blank lines just make for more scrolling when we're trying to read your code.

You need to actually explain what the problem is you're having. If you're getting an error message then post the full text of the error message using code tags.

int Swimhours;
int Swimminutes;
int Swimseconds;
int Bikehours;
int Bikeminutes;
int Bikeseconds;
int Runhours;
int Runminutes;
int Runseconds;
int STs;
int BTs;
int RTs;
int Th;
int Tm;
int Ts;
int Overallseconds[3] = { STs, BTs,  RTs};           
int Totaltime[3] ={Th, Tm, Ts};

The code block above is in the setup() function so these variables will only be available in that function but you actually never use them

Later in the code you declare several variable with the same names so at the best it is confusing.

Much of your code is outside of a function, which is not allowed.

Some of your code lines are not terminated with semicolons.

When I found these problems I stopped looking.

Here is the code Auto Formatted in the IDE and in code tags. The problems noted above become apparent when the code is formatted

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  int Swimhours;
  int Swimminutes;
  int Swimseconds;
  int Bikehours;
  int Bikeminutes;
  int Bikeseconds;
  int Runhours;
  int Runminutes;
  int Runseconds;
  int STs;
  int BTs;
  int RTs;
  int Th;
  int Tm;
  int Ts;
  int Overallseconds[3] = { STs, BTs,  RTs};
  int Totaltime[3] = {Th, Tm, Ts};
}

int Overallseconds[3] = int { ST,  BT, RT};              // ST = SwimTime, BT = BikeTime, RT = RunTime

int Swimhours;
Serial.println("enter swim time in hours");  //<<<<< NOT IN A FUNCTION
while (!Serial.available())       //wait for a the user to enter a value
{
}
Swimhours = Serial.parseInt();
Serial.println(Swimhours);

int Swimminutes ;
Serial.println("enter swim time in minutes");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Swimminutes = Serial.parseInt();
Serial.println(Swimminutes);

int Swimseconds ;
Serial.println("enter swim time in seconds");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Swimseconds = Serial.parseInt();
Serial.println(Swimseconds);

Serial.print("Swim Time:");
Serial.print(Swimhours);
Serial.print("hrs");
Serial.print(Swimminutes);
Serial.print("mins");
Serial.print(Swimseconds);
Serial.println("Secs");

STs = (Swimhours / 1) * (60 / 1) * (60 / 1) + Swimminutes * 60 + Swimseconds;

// Assign overall Swimseconds to ST

int Bikehours ;
Serial.println("enter bike time in hours");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Bikehours = Serial.parseInt();
Serial.println(Bikehours);

int Bikeminutes ;
Serial.println("enter bike time in minutes");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Bikeminutes = Serial.parseInt();
Serial.println(Bikeminutes);

int Bikeseconds ;
Serial.println("enter bike time in seconds");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Bikeseconds = Serial.parseInt();
Serial.println(Bikeseconds);

Serial.print("Bike Time:");
Serial.print(Bikehours);
Serial.print("hrs");
Serial.print(Bikeminutes);
Serial.print("mins");
Serial.print(Bikeseconds);
Serial.println("secs");

BTs = (Bikehours / 1) * (60 / 1) * (60 / 1) + Bikeminutes * 60 + Bikeseconds;

int Runhours ;
Serial.println("enter run time in hours");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Runhours = Serial.parseInt();
Serial.println(Runhours);

int Runminutes ;
Serial.println("enter enter run time in minutes");
while (!Serial.available())       //wait for a the user to enter a value                // code noting hours minutes and seconds in swim bike and run events
{
}
Runminutes = Serial.parseInt();
Serial.println(Runminutes);

int Runseconds ;
Serial.println("enter  run time  in seconds");
while (!Serial.available())       //wait for a the user to enter a value
{
}
Runseconds = Serial.parseInt();
Serial.println(Runseconds);

Serial.print("Run Time:");
Serial.print(Runhours);
Serial.print("hrs");
Serial.print(Runminutes);
Serial.print("mins");
Serial.print(Runseconds);
Serial.println("secs");

RTs = (Runhours / 1) * (60 / 1) * (60 / 1) + Runminutes * 60 + Runseconds;

}

int Totaltime[6] = {Th, Tm, Ts};                                // Th = Totalhours , Tm = Totalminutes, Ts = Totalseconds
Th = Swimhours + Bikehours + Runminutes  //<<<<MISSING SEMICOLON.  Th DECLARED ONLY IN setup()
     Tm = Swimminutes + Bikeminutes + Runminutes
          Ts = Swimtimes + Biketimes + Runtimes

               Totalhours = Th
                            Totalminutes = Tm
                                Totalseconds = Ts

                                    Serial.print("Total time:");
Serial.print(Totalhours);
Serial.print("hrs");
Serial.print(Totalminutes);
Serial.print("mins");
Serial.print(Totalseconds);
Serial.print("secs");

//Start of Functions


;
}

void printing(int Swimhours, int Swimminutes, int Swimseconds, int Bikehours, int Bikeminutes, int Bikeseconds, int Runhours, int Runminutes, int Runseconds, int Totalhours, int Totalminutes, int Totalseconds)
{
  Serial.print("Total time:");
  Serial.print(Totalhours);
  Serial.print("hrs");
  Serial.print(Totalminutes);
  Serial.print("mins");
  Serial.print(Totalseconds);
  Serial.print("secs");
}

Thanks, I'm new to Arduino so am finding it very confusing

Where did you get the code and how much did you change it ?

I went with a new layout was getting confused with the old one

 void setup() {
                                              // put your setup code here, to run once:
Serial.begin(9600);
int Swimoverallseconds;
int Bikeoverallseconds;
int Runoverallseconds;
int OverallSeconds;
SwimTimes();
BikeTimes();
RunTimes();
OverallSeconds( Swimoverallseconds,  Bikeoverallseconds,  Runoverallseconds);  
                                               // extra is named constant for the number 60(60secs in 1min, 60mins in 1hour)


 printing(Swimhours, Swimminutes, Swimseconds, Bikehours,Bikeminutes,Bikeseconds, Runhours, Runminutes,Runseconds, Totalhours, Totalminutes, Totalseconds);
}

//Start of Functions

int SwimTimes (){
int Swimhours ;  
Serial.println("enter swim time in hours");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Swimhours = Serial.parseInt();
Serial.println(Swimhours);

 int Swimminutes ;
Serial.println("enter swim time in minutes");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Swimminutes = Serial.parseInt();
Serial.println(Swimminutes);

int Swimseconds ;  
Serial.println("enter swim time in seconds");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Swimseconds = Serial.parseInt();
Serial.println(Swimseconds);

int Swimoverallseconds;
                                                                                          //Converting SwimTimes into seconds

 Swimoverallseconds = (Swimhours/1)*(60/1)*(60/1) + Swimminutes*60+Swimseconds; 


}
int BikeTimes(){
 int Bikehours ;  
Serial.println("enter bike time in hours");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Bikehours = Serial.parseInt();
Serial.println(Bikehours);
 
 int Bikeminutes ; 
Serial.println("enter bike time in minutes");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Bikeminutes = Serial.parseInt();
Serial.println(Bikeminutes);

int Bikeseconds ;  
Serial.println("enter bike time in seconds");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Bikeseconds = Serial.parseInt();
Serial.println(Bikeseconds);

int Bikeoverallseconds
Bikeoverallseconds = (Bikehours/1)*(60/1)*(60/1) + Bikeminutes*60+Bikeseconds;

}
int RunTimes(){
int Runhours ;  
Serial.println("enter run time in hours");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Runhours = Serial.parseInt();
Serial.println(Runhours);
 
 int Runminutes ; 
Serial.println("enter enter run time in minutes");
while (!Serial.available()) {     //wait for a the user to enter a value                // code noting hours minutes and seconds in swim bike and run events
} 
Runminutes = Serial.parseInt();
Serial.println(Runminutes);

int Runseconds ;  
Serial.println("enter  run time  in seconds");
while (!Serial.available()) {     //wait for a the user to enter a value     
} 
Runseconds = Serial.parseInt();
Serial.println(Runseconds);
const int extra = 60;    

int Runoverallseconds
Runoverallseconds = (Runhours/1)*(60/1)*(60/1)+ Runminutes*60 + Runseconds;          // extra is named constant for the number 60(60secs in 1min, 60mins in 1hour)
int OverallSeconds(){ 
int Overallseconds;//Seperate function that calculates overall seconds for events
Overallseconds = Swimoverallseconds + Bikeoverallseconds + Runoverallseconds
;
}
void printing(int Swimhours, int Swimminutes, int Swimseconds, int Bikehours, int Bikeminutes, int Bikeseconds, int Runhours, int Runminutes, int Runseconds, int Totalhours, int Totalminutes, int Totalseconds){
Serial.print("Swim Time:");
 Serial.print(Swimhours);
 Serial.print("hrs");
 Serial.print(Swimminutes);
 Serial.print("mins");
 Serial.print(Swimseconds);
 Serial.println("Secs");
 
 Serial.print("Bike Time:");
 Serial.print(Bikehours);
 Serial.print("hrs");
 Serial.print(Bikeminutes);
 Serial.print("mins");
 Serial.print(Bikeseconds);
 Serial.println("secs");
 
 Serial.print("Run Time:");
 Serial.print(Runhours);
 Serial.print("hrs");
 Serial.print(Runminutes);
 Serial.print("mins");
 Serial.print(Runseconds);
 Serial.println("secs");
 
 Serial.print("Total time:");
 Serial.print(Totalhours);
 Serial.print("hrs");
 Serial.print(Totalminutes);
 Serial.print("mins");
 Serial.print(Totalseconds);
 Serial.print("secs");
}
void loop() 
{

No errors printed , but the values don't add up (Print out on Arduino below)

enter swim time in hours
2
enter swim time in minutes
50
enter swim time in seconds
59
enter bike time in hours
0
enter bike time in minutes
50
enter bike time in seconds
59
enter run time in hours
1
enter run time in minutes
50
enter run time in seconds
59

Swim Time:0hrs0mins0Secs
Bike Time:0hrs0mins0secs
Run Time:0hrs0mins0secs
Total time:0hrs0mins0secs

pert:
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:

[code]

[color=blue]// your code is here[/color]

[/code]

Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason or random blank lines just make for more scrolling when we're trying to read your code.

Please take the time to actually learn how to use code tags. I can tell you're kind of trying but you're failing. The code needs to be between the two tags (see above). And you didn't even bother with the auto format or removing the unnecessary blank lines.

Is that better

No

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  int Swimhours;
  int Swimminutes;
  int Swimseconds;
  int Bikehours;
  int Bikeminutes;
  int Bikeseconds;
  int Runhours;
  int Runminutes;
  int Runseconds;
  int STs;
  int BTs;
  int RTs;
  int Th;
  int Tm;
  int Ts;
  int Overallseconds[3] = { STs, BTs,  RTs};
  int Totaltime[3] = {Th, Tm, Ts};
}

OK, I give up. Please explain why you are still declaring these variables in setup() ?

I'm not using that code any more

And the code you are using is ultra secret?

Thegrandcheese:
I'm not using that code any more

Then please post the complete program that you are using.

By the way, I have seen this program, or at least one trying to do the same thing, in this forum recently. I assume that it is some kind of assignment.

UKHeliBob:
Then please post the complete program that you are using.

By the way, I have seen this program, or at least one trying to do the same thing, in this forum recently. I assume that it is some kind of assignment.

...and also not quite so recently here - note the date. And yes, it's from the same university.

const int HOUR_MULTIPLIER = 3600;
const int MIN_MULTIPLIER = 60;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
//declaring all variables in the program
int Inputs();
int calculations();
}
int Inputs(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
Serial.println("please enter the time taken");
Serial.println("swimming hours, minutes and seconds. Enter the same for bike and run");
while (!Serial.available()) {};
total_secs [0] = Serial.parseInt() * HOUR_MULTIPLIER; //converting hours to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt() * MIN_MULTIPLIER; // converting minutes to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt();
while (!Serial.available()) {};
total_secs [1] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs[1] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [1] += Serial.parseInt();

while (!Serial.available()) {};
total_secs [2] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt();
total_secs [3] = total_secs [0] + total_secs [1] + total_secs [2];
}

int calculations(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
for (int index = 0; index < 4; index++) {

Serial.println(names[index]);
Serial.print(" hours ");
Serial.print(total_secs[index] / HOUR_MULTIPLIER);
total_secs[index] = total_secs[index] % HOUR_MULTIPLIER;
Serial.print( " minutes " );
Serial.print(total_secs[index] / MIN_MULTIPLIER);
total_secs[index] = total_secs[index] % MIN_MULTIPLIER;
Serial.print(" seconds ");
Serial.println(total_secs[index]);
}
}
void loop() {
// put your main code here, to run repeatedly:
}

You've been asked to use code tags.
Can you see why now?

Is this yet another posing of exactly the same question?

Do you know the difference between a function prototype and the invocation (calling) of a function?

const int HOUR_MULTIPLIER = 3600;
const int MIN_MULTIPLIER = 60;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
//declaring all variables in the program
int Inputs();
int calculations();
}
int Inputs(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
Serial.println("please enter the time taken");
Serial.println("swimming hours, minutes and seconds. Enter the same for bike and run");
while (!Serial.available()) {};
total_secs [0] = Serial.parseInt() * HOUR_MULTIPLIER; //converting hours to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt() * MIN_MULTIPLIER; // converting minutes to seconds
while (!Serial.available()) {};
total_secs [0] += Serial.parseInt();
while (!Serial.available()) {};
total_secs [1] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs[1] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [1] += Serial.parseInt();

while (!Serial.available()) {};
total_secs [2] = Serial.parseInt() * HOUR_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt() * MIN_MULTIPLIER;
while (!Serial.available()) {};
total_secs [2] += Serial.parseInt();
total_secs [3] = total_secs [0] + total_secs [1] + total_secs [2];
}

int calculations(){
long total_secs [4];
String names[4] = ("swim", "run", "bike", "total");
for (int index = 0; index < 4; index++) {

Serial.println(names[index]);
Serial.print(" hours ");
Serial.print(total_secs[index] / HOUR_MULTIPLIER);
total_secs[index] = total_secs[index] % HOUR_MULTIPLIER;
Serial.print( " minutes " );
Serial.print(total_secs[index] / MIN_MULTIPLIER);
total_secs[index] = total_secs[index] % MIN_MULTIPLIER;
Serial.print(" seconds ");
Serial.println(total_secs[index]);
}
}
void loop() {
// put your main code here, to run repeatedly:
}

...and that earns you an outright ban for time-wasting.