Monty374

Spanish Numbers

Oct 18th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. package spanishnumbers;
  2.  
  3. /**
  4. *
  5. * @author Monty
  6. */
  7. public class SpanishNumbers {
  8.  
  9. /**
  10. * @param args the command line arguments
  11. */
  12. public static void main(String[] args) {
  13. int num = 0;
  14. while (num < 10){
  15. for (int i = 1; i <= 11; i++) {
  16. spanish(i);
  17. }
  18. num +=1;
  19. }
  20. }
  21.  
  22. public static void spanish(int i) {
  23. switch (i) {
  24. case 1: System.out.println(i + " Uno"); break;
  25. case 2: System.out.println(i + " Dos"); break;
  26. case 3: System.out.println(i + " Tres"); break;
  27. case 4: System.out.println(i + " Cuatro"); break;
  28. case 5: System.out.println(i + " Cinco"); break;
  29. case 6: System.out.println(i + " Seis"); break;
  30. case 7: System.out.println(i + " Siete"); break;
  31. case 8: System.out.println(i + " Ocho"); break;
  32. case 9: System.out.println(i + " Nueve"); break;
  33. case 10: System.out.println(i + " Diez"); break;
  34. case 11: System.out.println("\n\n");
  35.  
  36. }
  37.  
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment