GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Algorithms-Java/src/Example7.java at master · professorDeveloper/Algorithms-Java Expand file tree/ Copy pathExample7.javaMore file actions 39 lines (35 loc) · 951 Bytes / Copy pathExample7.javaFile metadata and controls39 lines (35 loc) · 951 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 import java.util.Scanner; public class Example7 { // 1..10 oraliqda son berilgan // toq yoki juftga tekshirilsin public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); /* if (1 <= n && n <= 10) { if (n % 2 == 1) System.out.println("toq son"); else System.out.println("juft son"); } else { System.out.println("Oraliqqa tegishli emas"); } */ switch (n) { case 1: case 3: case 5: case 7: case 9: System.out.println("Toq son"); break; case 2: case 4: case 6: case 8: case 10: System.out.println("Juft son"); break; default: System.out.println("Oraliqqa tegishli emas"); } } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |