Created
October 23, 2020 10:57
-
-
Save theonelucas/7db0c8abe305de0ec9a26ecf05ee3244 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// 35 km por 1 litro | |
// 12 km por dia (6 ida/6 volta) | |
// 1 litro gasonila = 4.29 (09/17) | |
$precoLitro = 4.29; | |
$totalKmPorLitro = 35; | |
$totalKmPorDia = 12; | |
$precoKm = $precoLitro / $totalKmPorLitro; | |
$totalKmPorMes = $totalKmPorDia * 21; | |
$precoDia = $precoKm * $totalKmPorDia; | |
$custoMes = $precoKm * $totalKmPorMes; | |
$totalMonth = $totalKmPorMes / $totalKmPorLitro; | |
echo "Total KM's por mês (21 dias úteis): $totalKmPorMes".PHP_EOL; | |
echo "Custo por dia: ".round($precoDia, 2).PHP_EOL; | |
echo "Custo por mês: ".round($custoMes, 2).PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment