Could I have some guidance on this problem?

The problem set by my worksheet asks us to devise a program using Arduino Uno with limited function use i.e. no if statements and such only ints and parseints. This is my code so far:

int totalHrs;
int totalMinutes;
int totalSeconds;
int swimHours;
int swimMinutes;
int swimSeconds;
int bikeHours;
int bikeMinutes;
int bikeSeconds;
int runHours;
int runMinutes;
int runSeconds;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);

Serial.println("Please enter the number of hours for the swim");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
swimHours = Serial.parseInt();
Serial.println("Please enter the number of minutes for the swim");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
swimMinutes = Serial.parseInt();
Serial.println("Please enter the number of seconds for the swim");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
swimSeconds = Serial.parseInt();

Serial.println("Please enter the number of hours for the bike");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
bikeHours = Serial.parseInt();
Serial.println("Please enter the number of minutes for the bike");
while (!Serial.available()) {
//wait for the user to enter a value
;
}

bikeMinutes = Serial.parseInt();
Serial.println("Please enter the number of seconds for the bike");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
bikeSeconds = Serial.parseInt();

Serial.println("Please enter the number of hours for the running");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
runHours = Serial.parseInt();
Serial.println("Please enter the number of minutes for the running");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
runMinutes = Serial.parseInt();
Serial.println("Please enter the number of seconds for the running");
while (!Serial.available()) {
//wait for the user to enter a value
;
}
runSeconds = Serial.parseInt();

totalHrs = swimHours + bikeHours + runHours;
Serial.print(totalHrs);
Serial.print("hr");
totalMinutes = swimMinutes + bikeMinutes + runMinutes;
Serial.print(totalMinutes % 60);
Serial.print("min");
totalSeconds = swimSeconds + bikeSeconds + runSeconds;
Serial.print(totalSeconds);
Serial.print("sec");

}

void loop() {
// put your main code here, to run repeatedly:

}

At the moment the calculations work as intended, but now I want it to convert and carry over to the next column for example 0hr90min0sec -> 1hr30min0sec.

Using Delta_G suggestion, this begs for a function:

#define SWIM      0
#define BIKE      1
#define RUN       2

   // your code 

void loop()
{
    int sSwim;
    int sBike;
    int sRun;

   sSwim = GetSeconds(SWIM);
   sBike = GetSeconds(BIKE);
   sRun  = GetSeconds(RUN);
   // ...whatever...
}

int GetSeconds(int which)
{
    char buff[9];
    int charsRead;

    Serial.print("Enter total seconds for ");
    switch (which) {
      case SWIM:
         Serial.print("swim");
         break;
     case BIKE:
         Serial.print("bike");
         break;
     case RUN:
         Serial.print("run");
         break;
    }
    while (1) {
       if (Serial.available() > 0) {
          charsRead = Serial.readBytesUntil('\n', buff, sizeof(buff) - 1);  
          buff[charsRead] = '\0';
          return atoi(buff);
       }
    }
}

You could replace the Serial code in the while loop and use parseInt() if you want.

Ok it works now thanks Delta G, We didn't cover functions therefore couldn't use them for the sake of building a solution. As for For loops are concerned, is there a way of having the loop iterate over an array that stores user input, but have only one while loop for waiting on the user to input a value each time, with your answer please give a solution it would help even if it has functions to handle input and the correct output I.e. Swim: xhrs xmins xsecs
Bike: xhrs xmins xsecs
Runtime: xhrs xmins xsecs
Total: xhrs xmins xsecs
Where x indicates an integer value
Should there be some constants in there too? I can't go beyond what I've learnt so far so whatever functions the latter posted I have no clue what that does.

We didn't cover functions therefore couldn't use them for the sake of building a solution.

Why not? Is it not OK to learn on your own?

adt22:
i.e. no if statements and such only ints and parseints.

How is it possible to write useful code without decision making with IF etc?

And parseInt() is a blocking function and is best avoided. See Serial Input Basics

...R