Conversion minutes seconds and hour coderinme

Conversion minutes seconds and hour

This is program to convert the seconds in equivalent hours minutes and seconds.
Conversion in minutes seconds and hour

#include<stdio.h>

int main(){
 
 	int min,sec,hour,secs;

	printf("Enter Seconds you wish to convert \t");

	scanf("%d",&sec);

	hour=sec/3600;

	min=(sec%3600)/60;

	secs=(sec%3600)%60;

	printf("Given seconds %d will be equivalent to :%d hours, %d min and %d seconds \n",sec,hour,min,secs);

	return 0;
		}

Enter Seconds you wish to convert 37656
Given seconds 37656 will be equivalent to :10 hours, 27 min and 36 seconds

2 comments: On Conversion minutes seconds and hour coderinme

Leave a reply:

Your email address will not be published.