Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package spanishnumbers;
- /**
- *
- * @author Monty
- */
- public class SpanishNumbers {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- int num = 0;
- while (num < 10){
- for (int i = 1; i <= 11; i++) {
- spanish(i);
- }
- num +=1;
- }
- }
- public static void spanish(int i) {
- switch (i) {
- case 1: System.out.println(i + " Uno"); break;
- case 2: System.out.println(i + " Dos"); break;
- case 3: System.out.println(i + " Tres"); break;
- case 4: System.out.println(i + " Cuatro"); break;
- case 5: System.out.println(i + " Cinco"); break;
- case 6: System.out.println(i + " Seis"); break;
- case 7: System.out.println(i + " Siete"); break;
- case 8: System.out.println(i + " Ocho"); break;
- case 9: System.out.println(i + " Nueve"); break;
- case 10: System.out.println(i + " Diez"); break;
- case 11: System.out.println("\n\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment