fork(1) download
  1. #include<stdio.h>
  2.  
  3. int main() {
  4. float hora;
  5. printf("Insira as horas formatada 0.00: ");
  6. scanf("%f", &hora);
  7. float min = hora;
  8. hora = (int)hora;
  9. min = (min - hora) * 100;
  10. hora = hora * 60 + min;
  11. printf("%2.0f minutos", hora);
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/195780/101
Success #stdin #stdout 0s 4512KB
stdin
4.30
stdout
Insira as horas formatada 0.00: 270 minutos