လၢႆးၸႂ်ႉတိုဝ်း Scanner 02 မိူၼ်လၢႆးသိုဝ်ႉၼႅတ်ႉ MPT
java code example
import java.util.Scanner; public class lesson10 { public static void main(String []args){ Scanner sc = new Scanner(System.in); String code = sc.next(); switch (code){ case "*133#": System.out.println("1. Data Pack"); System.out.println("2. Facebook Pack"); System.out.println("3. Other Pack"); String numberpacck = sc.next(); if (numberpacck.equals("1")){ System.out.println("1. 400 MB+700 (Pack)"); System.out.println("2. 900 MB + Data Pack"); System.out.println("3. 1 GB + Data Pack"); }else if (numberpacck.equals("2")){ System.out.println("200 MB + 499 ks (Facebook Pack)"); System.out.println("700 MB + 999 ks (Facebook Pack"); System.out.println("1 GB + 1500 ks (Facebook Pack"); }else if (numberpacck.equals("3")){ System.out.println("Voice Call Pack"); System.out.println("Other Call"); System.out.println("other call"); } break; default:{ System.out.println("Number code Error"); } } } }
No comments:
Post a Comment