Advertisement
Guest User

RandTemps- Armand

a guest
Oct 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.io.*;
  2.  
  3.  
  4. public class RandTemps {
  5.  
  6.     public static void main(String[] args) throws IOException
  7.     {
  8.         PrintWriter fileOut = new PrintWriter(new FileWriter("temperatures.txt"));
  9.         for (int x=0; x<365; x++)
  10.         {
  11.             fileOut.println((int)(Math.random()*62+-21));
  12.         }
  13.         fileOut.close();
  14.  
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement