fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Song
  9. {
  10. public static void main (String[] args)
  11. {
  12. int amount = 99;
  13. String word = "x";
  14.  
  15. if(amount ==1) word ="y";
  16.  
  17. while(amount>0){
  18. if(amount ==1) word ="y";
  19. System.out.println(word + " " + amount);
  20. amount--;
  21. }
  22. }
  23. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
x 99
x 98
x 97
x 96
x 95
x 94
x 93
x 92
x 91
x 90
x 89
x 88
x 87
x 86
x 85
x 84
x 83
x 82
x 81
x 80
x 79
x 78
x 77
x 76
x 75
x 74
x 73
x 72
x 71
x 70
x 69
x 68
x 67
x 66
x 65
x 64
x 63
x 62
x 61
x 60
x 59
x 58
x 57
x 56
x 55
x 54
x 53
x 52
x 51
x 50
x 49
x 48
x 47
x 46
x 45
x 44
x 43
x 42
x 41
x 40
x 39
x 38
x 37
x 36
x 35
x 34
x 33
x 32
x 31
x 30
x 29
x 28
x 27
x 26
x 25
x 24
x 23
x 22
x 21
x 20
x 19
x 18
x 17
x 16
x 15
x 14
x 13
x 12
x 11
x 10
x 9
x 8
x 7
x 6
x 5
x 4
x 3
x 2
y 1