write a program to illustrate modulus operator in which second is given as an input and the program converts it to hours, minutes and seconds
/*A program to illustratet the modulus operator in which second is given as an input and the program converts it to houurs,minutes and seconds.
programmed by:
Name: Jitendra Kumar Yadav
Roll: 16
Date: 11 jan 20119*/
#include <stdio.h>
#include <conio.h>
void main()
{
int hours,minutes,seconds,z;
printf(“Enter the time in seconds: “);
scanf(“%d”,&seconds);
hours=seconds/(60*60);
z=seconds%(60*60);//modulus operator to give remainder
minutes=z/60;//it will only give quotient which is minutes
seconds=z%60;//it will give remainder which is seconds
printf(“%d hours %d minutes %d seconds”,hours,minutes,seconds);
getch();
}








