Computer Science, asked by vanithadheravath22, 5 months ago

write a program to read hours ad minutes ad convert hours to miniutes ad minutes to hours​

Answers

Answered by sangeetseth626
2

Answer:

Explanation:

#include <stdio.h>

int main() {

int sec, h, m, s;

print f ("Input seconds: ");

scan f("%d", &sec);

h = (sec/3600);

m = (sec -(3600*h))/60;

s = (sec -(3600*h)-(m*60));

printf("H:M:S - %d:%d:%d\n",h,m,s);

return 0;

}

Similar questions