Guest User

Untitled

a guest
Jun 24th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.Scanner;
  3. import java.text.DecimalFormat;
  4.  
  5.  
  6. public class Labo3
  7. {
  8.  
  9. public static void main(String[] args) throws IOException
  10. {
  11. File Temp = new File("temperature.txt");
  12. Scanner lectureT = new Scanner(Temp);
  13. lectureT.useDelimiter("&");
  14.  
  15. tabtemp.capt = lectureT.next().trim();
  16. tabtemp.lat = Integer.parseInt(lectureT.next().trim());
  17.  
  18.  
  19. System.out.println("Capteur: "+tabtemp.capt+" latitude: "+tabtemp.lat);
  20. for (int i=0;lectureT.hasNext();i++)
  21. {
  22.  
  23.  
  24.  
  25.  
  26.  
  27. }
  28.  
  29.  
  30. }
  31.  
  32. }
  33.  
  34. class tabtemp
  35. {
  36. static String capt;
  37. static int lat;
  38. Temp[]temp = new Temp[12];
  39. }
  40.  
  41. class Temp
  42. {
  43. String mois;
  44. float temp;
  45. }
Add Comment
Please, Sign In to add comment