วันพุธที่ 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);
 }
}

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

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

SQL script delete all table of database

 SELECT  'TRUNCATE TABLE ' + quotename(S.name) + '.' + quotename(T.name) + char(13) + char(10) + ' ' + char(13) + ch...