/* PROGRAMA QUE CALCUA EL PROMEDIO DE UN CORREDOR DADAS LAS CIFRAS
EN METROS MINUTOS SEGUNDOS Y MILECIMAS DE SEGUNDOS...
MOSTRANDO EL RESULTADO EN KM POR HRS.
AUTOR: CARLOS E. LÓPEZ */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
main()
{
float distancia = 0;
float min= 0;
float seg= 0;
float milseg= 0;
float hrs=0;
float resultado =0;
printf("\nPROGRAMA QUE CALCUA EL PROMEDIO DE UN CORREDOR EN KM POR HRS.\n\n" );
printf("Introduzca la Distancia en Metros: ");
scanf ("%f",&distancia);
printf("Introduzca el Tiempo en Minutos: ");
scanf ("%f",&min);
printf("Introduzca el Tiempo en Segundos: ");
scanf ("%f",&seg);
printf("Introduzca el Tiempo en Milesimas de Segundos: ");
scanf ("%f",&milseg);
seg=seg+(milseg/100);
min=min+(seg/60);
hrs=hrs+(min/60);
distancia=distancia/1000;
resultado=distancia/hrs;
printf ("\nLA VELOCIDAD PROMEDIO ES: %f KM/HRS.\n\n\n\n",resultado);
system("PAUSE");
return 0;
getch();
}
EN METROS MINUTOS SEGUNDOS Y MILECIMAS DE SEGUNDOS...
MOSTRANDO EL RESULTADO EN KM POR HRS.
AUTOR: CARLOS E. LÓPEZ */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
main()
{
float distancia = 0;
float min= 0;
float seg= 0;
float milseg= 0;
float hrs=0;
float resultado =0;
printf("\nPROGRAMA QUE CALCUA EL PROMEDIO DE UN CORREDOR EN KM POR HRS.\n\n" );
printf("Introduzca la Distancia en Metros: ");
scanf ("%f",&distancia);
printf("Introduzca el Tiempo en Minutos: ");
scanf ("%f",&min);
printf("Introduzca el Tiempo en Segundos: ");
scanf ("%f",&seg);
printf("Introduzca el Tiempo en Milesimas de Segundos: ");
scanf ("%f",&milseg);
seg=seg+(milseg/100);
min=min+(seg/60);
hrs=hrs+(min/60);
distancia=distancia/1000;
resultado=distancia/hrs;
printf ("\nLA VELOCIDAD PROMEDIO ES: %f KM/HRS.\n\n\n\n",resultado);
system("PAUSE");
return 0;
getch();
}