Created
March 8, 2016 18:16
-
-
Save rogerioagjr/21264aee6af92c219f70 to your computer and use it in GitHub Desktop.
Consumo
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
#include <cstdio> // scanf e printf | |
int main(){ | |
// declaro as variáveis x e y como double | |
double x, y; | |
// leio os seus valores | |
scanf("%lf %lf", &x, &y); | |
// imprimo o valor de x/y até a terceira casa decimal | |
// seguido de " km/l" e da quebra de linha | |
printf("%.3lf km/l\n", x/y); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment