There is a program that converts from seconds to hours, minutes, seconds.
#include <stdio.h> main() { // cor do cmd (verde) system("color 2"); // variaveis decimais int vremya, chasi, minuti, secundi; printf("Vvedite vremya v secundah: "); scanf("%i", &vremya); // calculos chasi = vremya / 3600; minuti = vremya * 60; secundi = vremya; // apresenta os resultados printf("\nVremya: %i:%i.%i\t ", chasi, minuti, secundi); // pause system("PAUSE"); }
But the program writes the wrong numbers, help solve. I do not know what to lean.