Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class P2Multiplikationstabelle {
- public static void main(String[] args) {
- final int n = 5;
- for (int i = 0; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- if (j == 1) {
- if (i != 0) {
- System.out.print(i);
- }
- System.out.print("\t ");
- }
- if (i == 0) {
- System.out.print ((i+1)*j + "\t ");
- } else {
- System.out.print (i*j + "\t ");
- }
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement