Wednesday, 24 September 2014

A Program To Convert Seconds Into Minutes And Hours.

A Program To Convert Seconds Into Minutes And Hours.

Source Code:

#include <stdio.h>
#include <conio.h>
//A program to convert seconds into minutes and hours by Akshay...
void main()
{
int s,m,h;
clrscr();
printf("\n Enter the value of seconds = ");
scanf("%d",&s);
printf(" \n Seconds = %d", s);
m = s/60;
h= s/3600;
printf("\n Minutes = %d",m);
printf("\n Hours = %d",h);
getch();
}

After writing the source code save with extension .CPP

Output:


No comments :

Post a Comment