fork download
  1. class Whatever {
  2. public static void main(String[] args) {
  3. int number = 6;
  4.  
  5. for(int compare = 2; compare <= number + 1; ++compare) {
  6. if (compare <= 2) {
  7. System.out.print("x ");
  8. } else {
  9. System.out.print(compare + " ");
  10. }
  11. }
  12. System.out.println();
  13.  
  14. for(int compare = 2; compare <= number + 1; ++compare) {
  15. if (compare <= 2) {
  16. System.out.print("x ");
  17. } else {
  18. System.out.print(compare + " ");
  19. }
  20. }
  21. System.out.println();
  22. }
  23. }
Success #stdin #stdout 0.11s 55688KB
stdin
Standard input is empty
stdout
x 3 4 5 6 7 
x 3 4 5 6 7