//*** Introducing using of the functions *** /* This program uses a function named "timeconvert". This function converts time in the form of hours, minutes and seconds all into seconds. This is the first example of timeconvert function. The timeconvert function written in this program neither needs inputs from the main body nor produces outputs for the main program. The function, independently takes the required inputs and prints the output on the screen. */ #include <stdio.h> #include <conio.h> //Defining Our Function void timeconvert(void) { int hour,minute,second; long int time; clrscr(); printf("Enter your time in the following format:\nhours\nminutes\nseconds\n"); scanf("%d%d%d",&hour,&minute,&second); time=(hour*3600)+(minute*60)+second; printf("The total time is equal to %d seconds.\n",time); } //Starting The Main Body void main() { timeconvert(); getch(); }