တွၼ်ႈၽိုၵ်းတႅမ်ႈ Java 19 (Scanner+do while+if, else if ၸႂ်ႉၵိုၵ်းၵၼ်)
java code example
public class lesson11 { public static void main(String []args){ Scanner sc = new Scanner(System.in); String s = sc.next(); switch (s) { case "*133#": do { System.out.println("1. data pack"); System.out.println("2. Facebook Pack"); System.out.println("3. Other Pack"); s = sc.next(); if (s.equals("1")) { System.out.println("1. 450 MB+ 700"); System.out.println("2. 2.GB + 1500 "); System.out.println("3. 88"); s = sc.next(); if (s.equals("2")||s.equals("2")) { System.out.println("Success"); } } } while (s.equals("88")); break; default: System.out.println("Number Code Error"); } } }
No comments:
Post a Comment