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

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

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

Install SonarQube on windows 11 and scan quility source code on local machine

 Download SonarQube on web  www.sonarsource.com Extract File Copy Folder to new directory , If you want to move. Go to Dowload load jdk ver ...