Advertisement
nocturnalmk

SLLKompanija

Nov 5th, 2012
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. public class SLLKompanija {
  2.     public static void main(String[] args) throws IOException {
  3.  
  4.         SLL lista1 = new SLL();
  5.         BufferedReader stdin = new BufferedReader(new InputStreamReader(
  6.                 System.in));
  7.         String s = stdin.readLine();
  8.         int N = Integer.parseInt(s);
  9.        
  10.         for (int i = 0; i < N; i++) {
  11.             s=stdin.readLine();
  12.             String s1=stdin.readLine();
  13.             lista1.insertLast(Integer.parseInt(s),Integer.parseInt(s1));
  14.         }
  15.         s = stdin.readLine();
  16.        
  17.         lista1=lista1.brisi_pomali_od(Integer.parseInt(s));
  18.         if(lista1!=null)
  19.         {
  20.             lista1=lista1.sortiraj_opagacki();
  21.             lista1.pecati(lista1);
  22.         }
  23.        
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement