Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

166
Visualizações
How to solve this problem using Javascript

In weather.dat there are data with meteorological surveys. The first column contains the day of the month, while the second and the third contain respectively the temperature maximum and minimum for that day. Write a program that, given the input file, returns the day with the smallest temperature range.

this is the link of a the data displayed in Atom:

The file that contains these data has a .dat extension, I have never used it so far so I don't even know how should I retrieve these data in my script! (should I rewrite them directly in the arrays?)

Please help!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In general files are separated into txt and binary files so extracting data is general for these two file types. File extensions are often used just for clarification.

How to extract data from a txt(.dat) file
Javascript file reader

As well idea for the given task:

  • Save days into a collection (optional)
  • Iterate over the collection of days
  • Calculate the temperature range for each day (Max - Min)
  • Find the min value
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda