Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class main
- {
- int funkcja(String nazwa, String szukaneNazwisko)
- {
- String nowaNazwa;
- String nowaNazwa1;
- nowaNazwa=nazwa+".TXT";
- nowaNazwa1=nazwa+".WYN";
- String nazwisko;
- int rokStudiow, rokLiczba;
- double sredniaOcen;
- double sredniaOcenDoZw;
- char plec;
- try(BufferedReader nowy = new BufferedReader(new FileReader(nowaNazwa)))
- {
- try(BufferedWriter nowy1 = new BufferedWriter( new FileWriter(nowaNazwa1)))
- {
- String linie;
- while((linie=nowy.readLine())!=null)
- {
- linie=nowy.readLine();
- if(linie==szukaneNazwisko)
- {
- sredniaOcenDoZw=sredniaOcen;
- }
- rokStudiow=Integer.parseInt(nowy.readLine());
- plec = linie.charAt(0);
- if(rokStudiow<=2 && plec='K')
- {
- }
- }
- }
- catch(IOException e){ e.getMessage();}
- }
- catch(IOException e){ e.getMessage();}
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement