I just wanted to tell all those folks (including some very foolish people who couldn't solve the problem, but just just commented petty things about the program) that I finally solve the problem.
Here's how I did it:
Code:
#include <stdio.h>
int convert(int time, int *hours, int *mins, int *secs);
int main()
{
int time, secs, mins, hours;
printf("Enter the number of time in seconds: ");
scanf("%d", &time);
convert(time, &hours, &mins,&secs);
printf("\nHours: %d", hours);
printf("\nMinutes: %d", mins);
printf("\nSeconds: %d", secs);
return 0;
}
int convert (int time, int *hours, int *mins, int *secs)
{
*hours = time / 3600;
time %= 3600;
*mins = time / 60;
time %= 60;
*secs = time;
}
Thanks to all those who really tried to help me!!!!!