Jump to content

programa de calculo de consumo automovel aos 100km


Recommended Posts

Boas pessoal!

Eu estou a participar num torneio, o tecla e pediram-me para fazer um programa para calcular o consumo do automovel aos 100km. Para isso dera-me 2 variaveisque pedem o valor dos km percorridos com L(litros).

Tenho o seguinte codigo:

Class W
    Public Shared Sub Main()
        Dim k As Double
        Dim l As Double
        Dim resultado As Double
        k = -1
        l = -1
        Do Until k >= 0 And k <= 10000 And l > 0 And l <= 100

            k = Console.ReadLine

            l = Console.ReadLine

        resultado = 100 * l / k
        resultado = Math.Round(resultado, 2)
    End Sub
End Class

O problema e que o compilador deles diz que esta errado.

Alguem pode ajudar a perceber qal o erro?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.