Öğrenciadı1 öğrencisoyadı1 öğrencinumarası1 öğrencinotu1
Öğrenciadı2 öğrencisoyadı2 öğrencinumarası2 öğrencinotu2
Öğrenciadı3 öğrencisoyadı3 öğrencinumarası3 öğrencinotu3
kodları;
package javaapplication27;
import java.util.*;
import java.io.*;
public class JavaApplication27 {
public static void main(String[] args) throws FileNotFoundException {
Scanner kl = new Scanner(System.in);
PrintStream yaz = null;
try {
File dosya = new File("C:\\belge.txt");
yaz = new PrintStream(dosya);
for (int i = 0; i < 2; i++) {
System.out.println("ad gir");
String ad = kl.next();
System.out.println("soyad gir");
String soyad = kl.next();
System.out.println("numara gir");
int no = kl.nextInt();
System.out.println("not gir");
int not = kl.nextInt();
yaz.println(ad + " " + soyad + " " + no + " " + not);
}
yaz.close();
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
}