Advertisement
cd62131

Print Minimum Temperature So Primitive

Dec 11th, 2013
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.54 KB | None | 0 0
  1. import java.io.*;
  2.  
  3. public class Minumum {
  4.   public static void main(String args[]) {
  5.     int i = 0;
  6.     int dans = 1;
  7.     float tans = 0;
  8.     float num;
  9.     String str;
  10.     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  11.     try {
  12.       while ((str = br.readLine()) != null) {
  13.         num = Float.parseFloat(str);
  14.         i++;
  15.         if (tans > dans) {
  16.           tans = num;
  17.           dans = i;
  18.         }
  19.       }
  20.     }
  21.     catch (Exception e) {
  22.     }
  23.     System.out.println(dans + "日: " + tans);
  24.   }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement