number of hours, minutes, and seconds given the number of seconds.
#include <stdio.h>
int main() {
int totalSeconds, hours, minutes, seconds;
// Step 1: Input the total number of seconds
printf("Enter the total number of seconds: ");
scanf("%d", &totalSeconds);
// Step 2: Calculate hours, minutes, and seconds
hours = totalSeconds / 3600;
minutes = (totalSeconds % 3600) / 60;
seconds = totalSeconds % 60;
// Step 3: Display the result
printf("Hours: %d, Minutes: %d, Seconds: %d\n", hours, minutes, seconds);
return 0;
}