วันพุธที่ 8 มีนาคม พ.ศ. 2560

Java language [ ว่าด้วยเรื่องของ mod ]

import java.io.*;
class morst 
{
 public static void main(String[] args) throws IOException
 {
  BufferedReader bfr= new BufferedReader(new InputStreamReader(System.in));
  String input,toUpper,mod="";
  int index,check;
  char chk;
  input=bfr.readLine();
  toUpper=input.toUpperCase();
  for(index=0;index<toUpper.length();index++)
   {
    //chk character
    chk=toUpper.charAt(index);
    //check integer
    check=(int)chk;
    if(check==65){mod=mod+".-";}
    if(check==66){mod=mod+"-...";}
    System.out.print(check+" "+chk);
   }
   System.out.print("Output : "+mod);
 }
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

Set Enable .Net framework 3.5 on windows 10 (ติดตั้ง .Netframework 3.5 บนวินโดวน์ 10)

1. Download windows 8.1 file [ TH : ดาวน์โหลดไฟล์ ของ windows 8.1 ] 2. Mount File windows Copy file \sources\sxs from mount drive ...