Skip to content

Instantly share code, notes, and snippets.

@mrnirva
Created September 3, 2020 00:22
Show Gist options
  • Save mrnirva/501e74797a02d83b7a6cf1b063508582 to your computer and use it in GitHub Desktop.
Save mrnirva/501e74797a02d83b7a6cf1b063508582 to your computer and use it in GitHub Desktop.
package ciktibicimleme;
public class CiktiBicimleme {
public static void main(String[] args) {
String sablon = "%5s %10s %10s %n";
System.out.printf(sablon ,"Okul No","Vize","Final");
System.out.printf(sablon ,"-------","-------","-------");
System.out.printf(sablon ,"120","50","85");
System.out.printf(sablon ,"121","80","85");
System.out.printf(sablon ,"122","25","-1");
System.out.printf(sablon ,"123","60","60");
System.out.printf(sablon ,"124","70","50");
/*
Çıktımız şöyle olacaktır
Okul No Vize Final
------- ------- -------
120 50 85
121 80 85
122 25 -1
123 60 60
124 70 50
*/
// Örnekte sablonu sonradan ekledik
// Belli aralıklar bırakarak yazdırdık
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment